I just try to install apache2 on my 14.04 Ubuntu server but I get an error:
* Starting web server apache2 (98)Address already in use: AH00073: make_sock: unable to listen for connections on address [::]:80
(98)Address already in use: AH00073: make_sock: unable to listen for connections on address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
*
* The apache2 instance did not start within 20 seconds. Please read the log files to discover problems
invoke-rc.d: initscript apache2, action "start" failed.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
I try to access the log file at /var/log/apache2/access.log but the file's empty.
Please help me to solve this error. Thanks.
UPDATE: I get this to netstat -antp | grep 80
(No info could be read for "-p": geteuid()=1001 but you should be root.)
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8082 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5432 127.0.0.1:42080 ESTABLISHED -
tcp 0 0 127.0.0.1:42080 127.0.0.1:5432 ESTABLISHED -
tcp 0 0 127.0.0.1:41880 127.0.0.1:5432 ESTABLISHED -
tcp 0 0 127.0.0.1:53380 127.0.0.1:11211 ESTABLISHED -
tcp 0 0 127.0.0.1:38980 127.0.0.1:11211 TIME_WAIT -
tcp 0 0 127.0.0.1:11211 127.0.0.1:53380 ESTABLISHED -
tcp 0 0 127.0.0.1:5432 127.0.0.1:41809 ESTABLISHED -
tcp 0 0 127.0.0.1:5432 127.0.0.1:41880 ESTABLISHED -
tcp 0 0 127.0.0.1:41809 127.0.0.1:5432 ESTABLISHED -
tcp6 0 0 127.0.0.1:8005 :::* LISTEN -
netstat -antp | grep 80
to see what is using port 80. This might be a duplicate of http://askubuntu.com/questions/277162/apache-fails-to-start-address-already-in-use-but-not-really – Ron May 15 '16 at 16:18