Im trying to setup a server with apache where each user has a logs folder in his home folder and all error/access logs are store in that folder.
My current setup:
<VirtualHost *:80>
DocumentRoot /home/user/public_html
ErrorLog /home/user/logs/error.log
CustomLog /home/user/logs/access.log combined
LogLevel info
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /home/user1/public_html
ErrorLog /home/user1/logs/error.log
CustomLog /home/user1/logs/access.log combined
LogLevel info
</VirtualHost>
The problem with this setup is that if i access the site of user1
http://localhost/~user1/
all logs are stored into /home/user/logs/ instead of /home/user1/logs/. How can i fix this so that the logs will be stored in the right place?