Tip: Apache Log Location

January 25, 2013 28.8k views
This isn't a question, just a tip that I hope someone finds useful. :) By default, your Apache logs get stored in /etc/apache2/error.log. The trouble with this location is that only the root user (not your sudo user) can access them. You can make them more accessible by having them written out to your user's folder. 1) sudo nano /etc/apache2/apache2.conf 2) Scroll down a bit find the line that says: ErrorLog ${APACHE_LOG_DIR}/error.log 3) Comment it out and replace it with: ErrorLog /home//logs/apache_errors.log 4) Create the /home//logs folder (or wherever you choose to put it) 5) Restart apache: sudo /etc/init.d/apache2 restart
2 Answers

Why /home//logs/apache_errors.log has double slash?

Have another answer? Share your knowledge.