When I using XAMPP or WAMP I getting the following issue:
XAMPP - Port 80 in use by "Unable to open process" with PID 4! 12
And it`s easy to solve it by changing the .ini file of Apache and tell him to use port 8080 (for example)...
But then I need always to specify in the URL the custom port:
While without modifying the default Apache localhost port: When he is the original 80, I could just put:
So I guess port 80 is default not just for Apache but for something else. My question if there is other way to config default parameter of browser/windows-system/whatever, to tell him that the default localhost port is now 8080 (for example), so I can still use the shorter URL version...
Best How To :
According to RFC2616, the default port for HTTP is 80, so browsers are designed to interpret a request without a defined port as a request to port 80. As far as I'm aware, there is no way to override this default (without some serious modification of the browser's code), either for a single host (such as localhost) or for all hosts.
Bottom line: If you want to use a port other than 80, that port must be defined in the request, as in 'localhost:8080/asset'.
That said, this command should show you which program is listening on port 80 in most linux distros (so you can figure out what's keeping Apache from being able to use port 80):
sudo netstat -apn | grep :80
For instance, on my little test server, I get this output:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1491/apache2
Which tells me it's being used by Apache (PID 1491).
Netstat is a great tool, here's an article that gives a few additional examples of how to use this tool.