When I try to start apache I get the following error

root@server11362:~# sudo /etc/init.d/apache2 restart

Restarting web server apache2 (98)Address already in use: 
   make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information. 

In fact the apache log contains no more information.

netstat -tulpn returns the following

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      1098/mysqld     
tcp        0      0*               LISTEN      1414/redis-server
tcp        0      0*               LISTEN      1068/named      
tcp        0      0*               LISTEN      1068/named      
tcp        0      0  *               LISTEN      1068/named      
tcp        0      0*               LISTEN      1194/postgres   
tcp        0      0 *               LISTEN      845/sshd        
tcp        0      0    *               LISTEN      1395/master     
tcp        0      0 *               LISTEN      1068/named      
tcp        0      0  *               LISTEN      1435/varnishd   
tcp        0      0*               LISTEN      1434/varnishd   
tcp6       0      0 :::53                   :::*                    LISTEN      1068/named      
tcp6       0      0 :::44888                :::*                    LISTEN      845/sshd        
tcp6       0      0 :::25                   :::*                    LISTEN      1395/master     
tcp6       0      0 ::1:953                 :::*                    LISTEN      1068/named      
tcp6       0      0 :::6081                 :::*                    LISTEN      1435/varnishd   
udp        0      0*                           1068/named      
udp        0      0*                           1068/named      
udp        0      0  *                           1068/named      
udp6       0      0 :::53

There is nothing on port 80 but I still cannot restart


There is possibly more broken, because you also get

Unable to open logs

First of all, enable more logging

LogLevel debug

in your /etc/apache2/apache2.conf.

Check your file permissions in /var/log/apache2.

I use often following command to debug:

strace -f apache2ctl start 2>&1|grep -v " ENOENT " | grep -Ee " E[A-Z]+"

It shows you excactly which calls are failed.


Another reason could produce overlapping listen adresses like:

Listen *:80

So you listen to all interfaces and the 2nd listen line tried to open an already opened port. Like described here.

| improve this answer | |
  • file permissions /var/log/ are 755 and 640 – user259920 Mar 23 '14 at 21:44
  • And you log file? – user224465 Mar 23 '14 at 22:13
  • 640 This is /etc/apache2/sites-availab/courseworkbank.info – user259920 Mar 24 '14 at 9:15
  • I meant, have looked also in /var/log/apache2/error.log? – user224465 Mar 24 '14 at 13:19
  • 2
    respecting your other posts you should check your configs for the Listen keyword first. – user224465 Mar 24 '14 at 17:15

Are you trying to start apache as a non-root user? It's possible you don't have permission to bind Apache to ports lower than 1024 (generally only possible by the root-user) and the log files are owned by someone other than apache:apache, or owned by root, which would prevent Apache from opening them.

Check that /etc/apache2/logs is owned by the apache2 user and that you are starting the service as root (and make sure that User and Group in the /etc/apache2/conf/apache2.conf (or httpd.conf) is specified to the correct user).

| improve this answer | |

My issue was that I had


in site configs.

But after PC restart my IP had changed to another ( Fixing the IP address solved the problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.