What is the difference between localhost/web vs. localhost:8080/web?
Description. The server might be running at a different port number than expected, either because it was intentionally installed there, or because another server was already running on the default port when the server was installed.
It is triggered if the firewall wrongly blocks your server or you're using the wrong port. The localhost error can also happen if your Apache web server or Chrome browser is not configured correctly.
A TCP/IP connection is always made to an IP address (you can think of an IP-address as the address of a certain computer, even if that is not always the case) and a specific (logical, not physical) port on that address.
Usually one port is coupled to a specific process or "service" on the target computer. Some port numbers are standardized, like 80 for http, 25 for smtp and so on. Because of that standardization you usually don't need to put port numbers into your web adresses.
So if you say something like http://www.stackoverflow.com, the part "stackoverflow.com" resolves to an IP address (in my case 64.34.119.12) and because my browser knows the standard it tries to connect to port 80 on that address. Thus this is the same as http://www.stackoverflow.com:80.
But there is nothing that stops a process to listen for http requests on another port, like 12434, 4711 or 8080. Usually (as in your case) this is used for debugging purposes to not intermingle with another process (like IIS) already listening to port 80 on the same machine.
Note from 2021: When I made this post, I used port 80 as example because even though the OP didn't specify a protocol, http was the usual web request standard back then and 80 ist the standard for http. Nowadays pretty much everything runs on https and the standard port for that is 443.
localhost/web
is equal to localhost:80/web
OR to 127.0.0.1:80/web
localhost:8080/web
is equal to localhost:8080/web
OR to 127.0.0.1:8080/web
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With