I had this problem with my Apache server not starting, because port 80 was being used by some other program, I changed the 'Listen' port number to 8888 and the server got started. But now the problem is, when I try to access 'http://localhost/' from my browser its not finding it. Can anyone let me know whats the problem here, and resolution for the same ?
Asked
Active
Viewed 4.4k times
3 Answers
9
Your browser is defaulting to port 80 if no port is specified.
![](../../users/profiles/651789.webp)
ken
- 16,047
- 3
- 46
- 70
-
1thanks... I understood it was a stupid question... :) – user1158831 Jan 19 '12 at 15:52
4
When you type "http://localhost/" in your webbrowser it automatically thinks you mean port 80 (default HTTP port). If you have changed the server port t o 8888 you need to mention this when typing in the URL like so: "http://localhost:8888" or alternatively "http://127.0.0.1:8888".
![](../../users/profiles/926665.webp)
Mekswoll
- 1,135
- 3
- 12
- 32
4
If you'd like to have apache listen on a port other than the default, you can do the following:
Edit ports.conf
nano /etc/apache2/ports.conf
Add a Listen directive
Listen default port
Listen 8888
Restart Apache
/etc/init.d/apache2 restart
![](../../users/profiles/1137156.webp)
tiks
- 31
- 1
- 3