Status of the doc: written after doing, not tested yet

This should only be done for errorlog, to help users debug their thing, but to avoid the IP logging on storage.

  • Create logs folder: sudo -u $user mkdir /home/$user/logs
  • Remove or comment corresponding line in /etc/apache2/sites-enabled/customsites.conf and add it in customsites-logged.conf
  • Reload apache2
  • Change group owner of newly created log file: # user=<user> # chown root:$user /home/$user/logs/*
  • Don't do that: force logs rotation once, to make it create log files with correct group: logrotate -vf /etc/logrotate.d/apache2-userlogs (this will rotate all user-accessible accesslogs and create files with correct perms)
  • Delete empty rotated logs, lying in /home/$user/logs

The related logrotate config can be found in /etc/logrotate.d/apache2-userlogs