Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When trying to restart Apache (with: service apache2 restart), I get the following error:

/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.

When I try to restart it with another command (sudo /etc/init.d/apache2 restart), I get the following error:

* Restarting web server apache2                                      
apache2: Could not reliably determine the server's fully qualified
domain name, using 127.0.1.1 for ServerName  ... waiting apache2:
Could not reliably determine the server's fully qualified domain name,
using 127.0.1.1 for ServerName

I had previously edited etc/apache2/httpd.conf with:

ServerName localhost

In order to resolve the above issue, but it seems not to have worked.

Can anyone help me out with this?

share|improve this question
1  
1. it should be sudo service apache2 restart, 2. The Apache error log may have more information., 3 apache2: Could not reliably determine the server's fully qualified is not a problem but a configuration issue (and has been answered before: askubuntu.com/questions/256013/… ) after this apache still is started. –  Rinzwind Apr 8 '13 at 10:37
    
Thanks for the reply. I've been on that thread and have edited the httpd.conf accordingly but I still get the error - that's why I thought it would be a different problem to the one on that thread. How do I access the error log to see what's going on? –  babbaggeii Apr 8 '13 at 10:51
    
command line: see /var/log It will have an apache log there. –  Rinzwind Apr 8 '13 at 11:25
    
@babbaggeii were you trying all of this on docker by any chance? –  Pieter Breed Aug 19 '13 at 8:24

1 Answer 1

I am going to get laughed off the planet. I was getting this error also; I had forgotten the all important sudo
sudo service apache2 restart

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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