[英]Configure Apache to record a host in access & error logs
By default, Apache
records an absolute URI in access_log
and error_log
file. 默认情况下, Apache
在access_log
和error_log
文件中记录一个绝对URI。 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. 因为我有多个指向同一目录的主机(域,子域),并且所有此类主机的日志都放在一个访问和错误日志文件中,所以我想(如果可能)将 Apache配置为在此类日志记录中包含主机信息。 Is there a way to do so? 有办法吗?
Add in LogFormat
%{Host}i
or %v
添加LogFormat
%{Host}i
或%v
http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.