Can't seem to run Apache 2.2 on Ubuntu 10.10 (Maverick Meerkat)
Another server is already listening on port 80 (the standard HTTP port), so the server cannot start. You can either figure out what's running on it and stop or reconfigure it, or you can change the port Apache listens on.
To see what is currently listening on port 80, open a terminal and run the following command:
sudo netstat --tcp --udp --listening --program
One of the lines of output will have :www
in the third column, as in this example from my machine:
tcp 0 0 *:www *:* LISTEN 1820/lighttpd
The last column indicates the PID and executable of the program currently listing on that port. In my case, it's the lighttpd web server, so I'd stop it with the service
command:
sudo service lighttpd stop
Alternatively, you can kill it using its PID:
sudo kill 1820
If you know what's running on port 80 and don't want to mess with it, you can instead reconfigure Apache to listen on a different port. To do so, edit your /etc/httpd/httpd.conf
file and locate the following line:
Listen 80
Change 80
to any number not in use on your system, like 8080
. Then, start Apache and you can visit it by appending a colon and the port number, like http://localhost:8080/
.