Log File Perms

Make the existing log files readable by apache and change the log rotation config so the new ones are too.

sudo chown root:www-data /var/log/apache2/*

sudo vi /etc/logrotate.d/apache2
...
...
 create 640 root www-data
...
...

Make the apache logs viewable in the config

sudo vi /etc/apache2/sites-enabled/you.your.org.conf

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/test.marietta.edu
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

	...
	...
	...

        Alias "/logs" "/var/log/apache2"
        <Directory "/var/log/apache2">

                Options Indexes
                Require all granted
        </Directory>

Note:

You may have to change the execute bit on the directory so the group has permission to list the contents.

https://serverfault.com/questions/961749/changing-default-apache-log-permissions


Last modified April 14, 2026: Old site imports (677647f)