Results 1 to 4 of 4
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.
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-27-2012 #1Just Joined!
- Join Date
- Sep 2012
- Posts
- 3
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:
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/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 then changed the logfile entry to this:
and suddenly the files are written to the correct folder /var/www/vhosts/troppo-jewelry.com/logs/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>
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
- 09-28-2012 #2Just Joined!
- Join Date
- Sep 2012
- Posts
- 3
[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....
- 09-30-2012 #3
Baliken,
Any time you make changes to apache files or update your site directories with content you will need to restart apache. You don't need to restart the server.
example /etc/init.d/apache restart--------------------------
Linux is the FORCE
- 09-30-2012 #4Just Joined!
- Join Date
- Sep 2012
- Posts
- 3
Thanks, but I restarted apache and reloaded the conf files by using:
/etc/init.d/apache reload
/etc/init.d/apache restart
But only after restarting the physical machine it worked....


Reply With Quote
