6e7f8f8b43e8a67ad0b53e9075dfea85973ba0f3
By:
paschalis

how can i see my ip:8080 externaly in apache server?

December 14, 2017 760 views
Apache Node.js Ubuntu 16.04

Hi,

i installed laravel and vue.js in an apache server. When i run vue from my terminal it works http://localhost:8080. When i try to check it externally like http://138.68.xxx.xxx:8080/, i see only This site can’t be reached.

I visited http://portquiz.net:8080/ and the result is that:
You have reached this page on port 8080. Your network allows you to use this port.

I haven't done anything yet because i am not experienced with servers. I read about vhosts etc, but a guidance or help for someone more experienced would be more than welcome.

Thank you

1 Answer

I'm assuming you're running php artisan serve. Running that should output:

Laravel development server started: <http://127.0.0.1:8000>

Notice how it says the server is accessible through http://127.0.0.1:8000 that is equivalent to http://localhost:8000. Since it's a development server, Laravel makes it accessible on the localhost loopback interface only, which means that it wouldn't be accessible from outside of the Droplet as a security measure. That's why browsing to http://138.68.xxx.xxx:8080/ isn't working.

Since you have Apache set up, edit the Apache config and make sure DocumentRoot for your domain name is set to /path/to/laravel/public (for example: /var/www/html/laravel/public). Doing so should allow Apache to serve your Laravel application in a production environment, on port 80.

Have another answer? Share your knowledge.