homepage Welcome to WebmasterWorld Guest from 54.204.141.129
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Separate logfiles for Mass Virtual hosting
How to force apache to write separate logfile using VirtualDocumentRoot
AcsCh




msg:1506179
 11:26 pm on Aug 12, 2003 (gmt 0)

I've setup Mass virtual hosting to redirect

www.somedomain.com to the directory

/home/path-to-web/somedomain.com/web

with the directive

VirtualDocumentRoot /home/path-to-web/%2+/web

BUT how can I now force apache (1.3) to write for every domain a separate logfile?

I've tried

CustomLog /home/path-to-web/%2+/logs/access_log combined
ErrorLog /home/path-to-web/%2+/logs/error_log

no way; crashes httpd, as he can not find /home/path-to-web/%2+/logs/access_log...

any other ideas? I've made desperates RDFM, but could not find nothing...
Thanks!

 

marcs




msg:1506180
 11:45 pm on Aug 12, 2003 (gmt 0)

Simply define the log file for each virtual host :

<virtualhost www.example.com>
...
TransferLog logs/example-access-log
</virtualhost>

Do this for each virtual host and they will all have their own log file. Replace the "example" in both virtualhost and Transfer log lines.

AcsCh




msg:1506181
 11:51 pm on Aug 12, 2003 (gmt 0)

Thanks, but this imposes that I have for every domain a separate virtualhost directive.
This is aceptable for my domains, but I intend to do the same for subdomains, and there are more than 7000, growing... urghhh

Is maybe some Logfile tool able to manage that?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved