By default, Apache
records an absolute URI in access_log
and error_log
file. Because I have multiple hosts (domains, subdomains) pointed to same directory and logs for all such hosts go into one access and error log file, I would like to configure (if possible) Apache to include host information within such log records. Is there a way to do so?
默认情况下,Apache在access_log和error_log文件中记录绝对URI。因为我有多个主机(域,子域)指向同一目录,所有这些主机的日志都进入一个访问和错误日志文件,我想配置(如果可能的话)Apache在这些日志记录中包含主机信息。有办法吗?
1 个解决方案
#1
1
Add in LogFormat
%{Host}i
or %v
http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
添加LogFormat%{Host} i或%v http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
#1
1
Add in LogFormat
%{Host}i
or %v
http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
添加LogFormat%{Host} i或%v http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats