For some development servers, I want to make all the Apache log files accessible via the web so developers can more easily debug. I've figured out how to modify the Apache site config to make the default /var/log/apache2
directory accessible, but unless I manually chmod the directory to be accessible to Apache's www-data
user, the files return the "Forbidden" error.
It looks like, by default on Ubuntu, Apache writes its logs with user root
and group adm
. How do I change this to user group www-data
so web users can read them?
Googling this, some have suggested editing the value for APACHE_RUN_GROUP
in /etc/apache2/envvars
, but this is already set to www-data
.