Reputation: 21
Here is my current vhost:
<VirtualHost *:80>
UseCanonicalName Off
VirtualDocumentRoot /var/www/%0/public
<Directory /var/www/%0/public>
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php index.html
AllowOverride All
Order allow,deny
Allow from all
</Directory
</VirtualHost>
How can I get a access.log for each %0 vhost?
FYI.. If it matters, this is a debian install.
Upvotes: 2
Views: 6973
Reputation: 5577
You can add the TransferLog in your VirtualHost definition. Don't forget to restart your Apache service when changing configuration.
<VirtualHost *:80>
UseCanonicalName Off
VirtualDocumentRoot /var/www/%0/public
ErrorLog/var/logs/%0/error.log
TransferLog /var/logs/%0/access.log
<Directory /var/www/%0/public>
Options Indexes FollowSymLinks Includes ExecCGI
DirectoryIndex index.php index.html
AllowOverride All
Order allow,deny
Allow from all
</Director>
</VirtualHost>
Upvotes: 2