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


--kfjH4zxOES6UT95V
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,
>=20
> How do I record the hits to my domains delivering the same pages.
>=20
> I have say 5 domains pointing to the same place
>=20
> www.domain1.com
> www.domain1.co.uk
> www.domain1.net
> www.domain1.org
> www.domain1.uk.org
>=20
> I would like to have just 1 access log capturing all hits to these domain=
s.
>=20
> 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
default.

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
customised.

	Cheers,

	Matthew

--=20
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

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBh1DziD657aJF7eIRAqrhAKCZ/385rBiNL3sVYP3VjgLTa4UXvgCfbqh5
lsf6IUJUdaUTM7viGVhLCv4=
=3Gyg
-----END PGP SIGNATURE-----

--kfjH4zxOES6UT95V--




More information about the Ukfreebsd mailing list