Ron Jones
2005-Dec-12 00:51 UTC
[CentOS] how do I set up separate log files/AWstats instances for a virtual host web server?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Hi all,<br> <br> 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/<<i>username</i>/public_html.<br> <br> 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)?<br> <br> Also, does anyone know of a resource that will help with the setup of Awstats under those circumstances, the software works beautifully, but the manual was written by the programmers.<br> <br> Thanks,<br> <br> Ron Jones<br> Alpharetta, GA<br> </body> </html>
Scot L. Harris
2005-Dec-12 01:31 UTC
[CentOS] how do I set up separate log files/AWstats instances for a virtual host web server?
On Sun, 2005-12-11 at 19:51, Ron Jones wrote:> > Also, does anyone know of a resource that will help with the setup of > Awstats under those circumstances, the software works beautifully, but > the manual was written by the programmers.Worked on a system in the past that used the tools from this site http://chaogic.com/vhost/ to setup multiple virtual sites which included awstats for each site. It also did a good job of managing email accounts and users on each site. You should be able to sort through the code for the applicable bits.
John Hinton
2005-Dec-12 03:59 UTC
[CentOS] how do I set up separate log files/AWstats instances for a virtual host web server?
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
Jim Perrin
2005-Dec-12 15:41 UTC
[CentOS] how do I set up separate log files/AWstats instances for a virtual host web server?
On 12/11/05, Ron Jones <ron.jones at rej.us> 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)? > > Also, does anyone know of a resource that will help with the setup of > Awstats under those circumstances, the software works beautifully, but the > manual was written by the programmers. > > Thanks, > > Ron Jones > Alpharetta, GA >You can use a statement like the following: LogFormat "%v %l %u %t \"%r\" %>s %b" commonvhost CustomLog logs/access_log commonvhost in your httpd.conf file, and awstats should recognize it as dealing with seperate vhosts. The %v is the vhost tag for apache logging. -- Jim Perrin System Architect - UIT Ft Gordon & US Army Signal Center