Monday, May 27, 2013

Add virtualhost name to apache logfile

If you have many ServerAlias in some apache VirtualHost and You want to see name of virtualhost in lofgile add  %{host}i to logformat direcive,

for example,

LogFormat "%h %{host}i %l %u %D %T %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined

No comments: