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
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.