Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RE: Apache Virtual Hosting and Logs

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Having issues with apache randomly righting to log files.
I currently have 4 virtual sub-domains writing to the same ErrorLog/CustomLog file

example:

<VirtualHost 66.134.xx.xx:80>
ServerAdmin admin@domain.com
DocumentRoot / ServerName domain.com
ServerAlias ErrorLog / CustomLog / combined

<Directory />
Options ALL
AllowOverride ALL
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 66.134.xx.xx:80>
ServerAdmin admin@domain.com
DocumentRoot / ServerName sub2.domain.com
ErrorLog / CustomLog / combined

<Directory />
Options ALL
AllowOverride ALL
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 66.134.xx.xx:80>
ServerAdmin admin@domain.com
DocumentRoot / ServerName sub3.domain.com
ErrorLog / CustomLog / combined

<Directory />
Options ALL
AllowOverride ALL
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 66.134.xx.xx:80>
ServerAdmin admin@domain.com
DocumentRoot / ServerName sub4.domain.com
ErrorLog / CustomLog / combined

<Directory />
Options ALL
AllowOverride ALL
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Unfortunately, it rights to the log file, randomly..
Sometimes it works and sometimes it doesn't.. Don't
know what is wrong. Besides that Apache runs fine..
I know this should work. Any suggestions?
 
If you are using the same logs for all you vhosts, why don't you just difine it once in the globals? I'm wondering if it could be a file locking problem.
 
Global, unfortunately I can't do that, I have other
v/d's defined besides the ones above which all write to different log files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top