Apache access logs and multiple domains to same place

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Nov 2 09:18:43 GMT 2004

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 02, 2004 at 07:50:44AM -0000, Dave Tiger wrote:
> Hi List,
> How do I record the hits to my domains delivering the same pages.
> I have say 5 domains pointing to the same place
> www.domain1.com
> www.domain1.co.uk
> www.domain1.net
> www.domain1.org
> www.domain1.uk.org
> I would like to have just 1 access log capturing all hits to these domain=
> I think it?s a virtual host config thing but I am lost in the maze of
> options so I plead for help and advise for this.

Just setup the apache logging in the default host, and not in any of
the virtual host sections -- they'll inherit the settings from the

Note that the default and the pre-canned custom access.log formats in
httpd.conf don't contain any record of which virtual host a request
was made to.  You need to add a '%v' to your log format to get that
(see http://httpd.apache.org/docs/mod/mod_log_config.html#formats) --
but that means your log analysis software will need to be similarly



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (FreeBSD)



More information about the Ukfreebsd mailing list