Jim Kelly on 8 Sep 2005 14:25:15 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Apache v1.3 configuration


That's great. Thanks, John.


On Sep 7, 2005, at 9:38 PM, John Von Essen wrote:

I can help with the last part regarding the logging of which virthost. You can create a single virthost entry (foo.com), then use ServerAlias for all the additional domains that also point to it (foo2.com, foo3.com, and so on).


By default, you probably have something like this in main config for the "combined" log format:


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined


Well, there is a log format variable for the virthost being requested, Its %V. So change the LogFormat for "combined" to:


LogFormat "%V %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined


Then in your virthost directive, you just have:


CustomLog /home/user/logs/access.log combined


And thats it!




-John Von Essn


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug