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.
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
John Hinton wrote on Sun, 11 Dec 2005 22:59:28 -0500:
You MUST make sure the logs directory exists in the user's directory.
You can, of course, put the logs elsewhere, so your users don't fiddle with them.
Kai
centos-bounces@centos.org <> 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@centos.org 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
Thanks very much for your help on this! I got things up and running, and was able to make the setup scalable as I add new sites.
A minor change to the log file parameters in httpd.conf per the instructions here http://www.dotvoid.com/view.php?id=29 and we were up and running
Once I finished, I looked back over what I'd done and realized that the .rpm file made things almost too easy, I had been looking all over the place for a walk-through for what I assumed was a terribly complex mess.
thanks again,
Ron Jones Alpharetta, GA
On 12/11/05, Ron Jones ron.jones@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