I have seen several questions concerning virtual hosting. In my solution
each domain has it's own log files, therefore it can have its own
webstats.html page. This is easy and it works. If anybody has a better way
I would love to hear it.
1. In httpd.conf make sure that each domain in the virtual domain container
has its own set of logs. Repeat for each one
<VirtualHost xx.xxx.xx.xx>
ServerName www.domain1.com
DocumentRoot /www/domain1.com/html
ServerAdmin [EMAIL PROTECTED]
Errorlog /www/domain1.com/logs/error.log
CustomLog /www/domain1.com/logs/access.log common
CustomLog /www/domain1.com/logs/referer.log referer
CustomLog /www/domain1.com/logs/agent.log agent
<VirtualHost>
<VirtualHost xx.xxx.xx.xx>
ServerName www.domain2.com
DocumentRoot /www/domain2.com/html
ServerAdmin [EMAIL PROTECTED]
Errorlog /www/domain2.com/logs/error.log
CustomLog /www/domain2.com/logs/access.log common
CustomLog /www/domain2.com/logs/referer.log referer
CustomLog /www/domain2.com/logs/agent.log agent
<VirtualHost>
2. copy the /etc/analog.cfg to /etc/domain1.analog.cfg. copy a seperate cfg
file for each domain. /etc/domain2.analog.cfg, /etc/domain3.analog.cfg, and
so on.
3. Change or add the LOGFILE commands to each domainX.analog.cfg
LOGFILE /www/domainX.com/logs/access.log*
LOGFILE /www/domainX.com/logs/referer.log
LOGFORMAT %B
LOGFILE /www/doaminX.com/logs/agent.log
OUTPUTFILE /www/domainX.com/html/webstats.htm
4. Run this commandline for each domain.
analog -G +g/etc/domainX.analog.cfg
I put each commandline in a batch file. Then set cron to run at midnight.
I hope this helps. Any suggestions feel free to email me.
Arthur
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stephen Turner
Sent: Monday, February 19, 2001 8:22 AM
To: [EMAIL PROTECTED]
Subject: Re: [analog-help] virtually hosted domains
On Mon, 12 Feb 2001, Albert Fung wrote:
> Hello all,
> I've tried searching the FAQs and databases but haven't seen a solution
for
> this one:
> I'd like to offer my virtual hosted domains analog, but am not sure how to
> do so. I have tried to edit the cfg and included vhostinclude using
either
> /usr/local/etc/httpd/vhosts/domain and just www.domain.com, each one in
the
> same config, but when I run analog, I get no output at all. if i remove
> those entries, the analog will run, but only for the main account, which
is
> for superconnected.com.
> I have my log files separated into each domains folder.
> any suggestions?
>
Have you read virtdoms.cfg in the examples directory?
--
Stephen Turner http://www.statslab.cam.ac.uk/~sret1/
Statistical Laboratory, Wilberforce Road, Cambridge, CB3 0WB, England
"Your account can only be used for a single internet session at any one
time and for no more than 24 hours in any one day." (NTL terms of use)
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------
------------------------------------------------------------------------
This is the analog-help mailing list. To unsubscribe from this
mailing list, send mail to [EMAIL PROTECTED]
with "unsubscribe" in the main BODY OF THE MESSAGE.
List archived at http://www.mail-archive.com/[email protected]/
------------------------------------------------------------------------