logging - How to customize LogFormat for Apache Virtual Hosts? -
i need this. server has multiple virtual hosts, each virtual host has access log, need able customize logformat each virtual host exist on server. have modified logformat in httpd.conf affects master access log , not virtual hosts.
here logformat:
<ifmodule log_config_module> logformat "%v:%a %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %{cf-connecting-ip}i" combinedvhost logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %{cf-connecting-ip}i" combined logformat "%h %l %u %t \"%r\" %>s %b %{cf-connecting-ip}i" common customlog "logs/access_log" combined customlog logs/access_log combinedvhost <ifmodule logio_module> logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %{cf-connecting-ip}i" combinedio </ifmodule> </ifmodule> <ifmodule mod_log_config.c> logformat "%v:%a %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %{cf-connecting-ip}i" combinedvhost logformat "%h %l %u %t \"%r\" %>s %b \"%{referer}i\" \"%{user-agent}i\" %{cf-connecting-ip}i" combined logformat "%h %l %u %t \"%r\" %>s %b %{cf-connecting-ip}i" common logformat "%{referer}i -> %u" referer logformat "%{user-agent}i" agent customlog logs/access_log common customlog logs/access_log combined customlog logs/access_log combinedvhost </ifmodule> the above logformat affects master access log located at: /usr/local/apache/logs/access_log however, not affect of virtual hosts on server have access logs located at: /home/username/access-logs/domain.com
i'm not sure if have wrong in logformat or i'm missing something. i've spent many hours trying solve problem didn't find solution. i'd appreciate if shed light on this. thank you.
i face same problem.. , found out file read / edit false. try search config. in xampp.. config in extra/httpd-vhost.conf
i found this
##<virtualhost *:80> ## serveradmin webmaster@dummy-host.example.com ## documentroot "c:/app/htdocs/dummy-host.example.com" ## servername dummy-host.example.com ## serveralias www.dummy-host.example.com ## errorlog "logs/dummy-host.example.com-error.log" ## customlog "logs/dummy-host.example.com-access.log" common ##</virtualhost> erase '#' ; try edit inside virtual host config.. believe edited in main site.. perhaps can share config related vhost ..
Comments
Post a Comment