Report this

What is the reason for this report?

Tip: Apache Log Location

Posted on January 25, 2013

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

  1. Comment it out and replace it with:

ErrorLog /home/<user>/logs/apache_errors.log

  1. Create the /home/<user>/logs folder (or wherever you choose to put it)
  2. Restart apache:

sudo /etc/init.d/apache2 restart



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

Sudo/etc/unit.dapace2 restate <br> <br>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.