« register_globals | Main | Install Awstats on FreeBSD »
January 21, 2005
Separate Log Files for Virutal Host
To have dedicated log file for each virtual host, add the following directive to VirtualHost directive in Apache config file: (FreeBSD)
ErrorLog /var/log/error_log_file_name
CustomLog /var/log/log_filename combined
The complete VirtualHost entry looks like:
<VirtualHost 1.2.3.4>
ServerAlias www.domain.com domain.com
ServerAdmin admin@domain.com
DocumentRoot /home/domain/www
ServerName www.domain.com
ErrorLog /var/log/error_log_file_name
CustomLog /var/log/log_filename combined
</VirtualHost>
Make sure to check the config file before restarting Apache:
# /usr/local/sbin/httpd -t
Category : Apache
Posted by FreeBSD Newbie at January 21, 2005 01:45 AM
