Home » Development, Ubuntu

Find Apache Access and Error Log in Ubuntu

20 February 2013 5,276 views No Comment Permanent Link

The Error and other log Files for Apache in Ubuntu is stored at the directory /var/log/apache2

To find the exact locaiton of these files you can adopt following steps.

The file for Apache Access and Error Logs are defined in the Apache Config at


To find the declaration you can grep the config file.

# grep ErrorLog /etc/apache2/apache2.conf

It will give you an Output like following

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
ErrorLog ${APACHE_LOG_DIR}/error.log

APACHE_LOG_DIR is a Environment Variable for Apache defined in /etc/apache2/envvars

If you look at the file using grep

# grep APACHE_LOG_DIR /etc/apache2/envvars

You will see the following Output

export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

It tells you that the Error Log File should be something like

The Access Log file can be found at /var/log/apache2/access.log

pixel Find Apache Access and Error Log in Ubuntu

PR: 0

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...