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.

I saw that my /var/log/apache2/error.log log was getting very big (runs a long time when I cat file, or open in editor). So I deleted it with rm. Not only does it not work now, it doesn't work when I recreate the file and chmod 777. How do I reenable it?

I tried restarting apache, it gives this error:

$ service apache2 restart
 * Restarting web server apache2                                                                                                                                                      /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.
share|improve this question

1 Answer 1

up vote 2 down vote accepted

Apache is still writing into the deleted file which isn't really deleted until Apache is stopped.

To restart Apache you need to be root:

sudo service apache 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.