Apache log file location for virtual host
Hi,
I'm using Debian 6.0.5 (squeeze) 64bit.
In the file /etc/apache2/sites-available/troppo-jewelry.com I have the following entry:
Code:
<VirtualHost *:80>
ServerAdmin webmaster_AT_troppo-jewelry.com
ServerName troppo-jewelry.com
ServerAlias www_dot_troppo-jewelry.com
# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /var/www/vhosts/troppo-jewelry.com/htdocs
# CGI Directory
ScriptAlias /cgi-bin/ /var/www/vhosts/troppo-jewelry.com/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>
# Logfiles
LogLevel warn
ErrorLog /var/www/vhosts/troppo-jewelry.com/logs/error.log
CustomLog /var/www/vhosts/troppo-jewelry.com/logs/access.log combined
</VirtualHost>
I can access the server no problem. But the log files are written to /var/www/vhosts/troppo-jewelry.com/ and not to /var/www/vhosts/troppo-jewelry.com/logs/
I then changed the logfile entry to this:
Code:
....snip...
# Logfiles
LogLevel warn
ErrorLog /var/www/vhosts/troppo-jewelry.com/logs/error.log
CustomLog /var/www/vhosts/troppo-jewelry.com/logs/access.log vhost_combined
</VirtualHost>
and suddenly the files are written to the correct folder /var/www/vhosts/troppo-jewelry.com/logs/
As far as I understand, "vhost_combined" or "combined" are just nicknames for the formatting of the log file. Why does this alter were they are stored???
Any help sincerely appreciated. This is driving me mad...
Thanks
[SOLVED]Apache log file location for virtual host
Hmmm, I don't know what happens, but after rebooting the machine, I tried again, and this time it works with both logfile formats...
Anyway, thanks for reading....