Star Hype News.

Premium celebrity moments with standout appeal.

news

http://localhost:8080/ vs http://server_IP_address:8080/

By Sebastian Wright

after installing tomcat7 on ubuntu.

what to do if works fine but does not. what is the difference between these two?

1

1 Answer

localhost is redirected to 127.0.0.1 via the lo local loopback interface, as defined in the hosts file. (/etc/hosts) This local link will work even if the computer does not have an internet connection.

Accessing from the server IP sends a connection through the internet. Your connection would get routed to the destination (server IP) via the server's internet connection on wlan0 or eth0, depending on the setup.

If the server is behind a router, you will need to forward port 8080 to the server's internal IP address, otherwise the connection will be stopped at the router. If you still can't connect, then you need to make sure that the port is open on your ISP, as well as on your computer's firewall.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy