how do I set up separate log files/AWstats instancesfor a virtual host web server?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



centos-bounces@xxxxxxxxxx <> scribbled on Sunday, December 11, 2005 9:59 PM:

> Ron Jones wrote:
> 
>> Hi all,
>> 
>> I've configured my server to to host multiple sites on a single IP
>> address, when complete, there will be no more than 5-6
> websites on the
>> server.  They are located in /home/</username//public_html.
>> 
>> Now, I'd like to add Awstats to each site, but to keep things
>> separated, I'd like to set up the log files independently.
> Can anyone
>> point me at a resource that will walk me through setting up &
>> configuring said log files per site (including subdomains)?
>> 
> 
> In each virtualhost section within your apache config file...
> 
> ErrorLog /home/<username>/logs/error_log CustomLog
> /home/<username>/logs/access_log common
> 
> or
> 
> ErrorLog /home/<username>/logs/error_log CustomLog
> /home/<username>/logs/access_log combined
> 
> which adds more detail, particularly in the referrer fields..
> This is configurable in the httpd.conf file as well.
> 
> You MUST make sure the logs directory exists in the user's
> directory. If it isn't there, apache will not restart. If a
> user removes the directory, apache won't restart. There are
> some scripts, one which is part of Webmin, which will deal
> with this for you.
> 
> I normally add these lines after DocumentRoot and before
> directory options, but it really doesn't matter. Just don't
> put them within <directory> areas.
> 
> Best,
> John Hinton
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> http://lists.centos.org/mailman/listinfo/centos

I typically put all the logs under /var/log/httpd/ so I don't have to mess
with the logrotate config each time I add a vhost.

Mike


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux