[root@daixuan ~]# vim /usr/local/apache2/conf/extra/httpd-vhosts.conf
ErrorLog "logs/dummy-host.example.com-error_log" logs目录位置是相对于/usr/local/apache2
CustomLog "logs/dummy-host.example.com-access_log" common
Apache的common日志格式定义:
[root@daixuan ~]# vim /usr/local/apache2/conf/httpd.conf
<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
本文出自 “daixuan” 博客,请务必保留此出处http://daixuan.blog.51cto.com/5426657/1718457
原文:http://daixuan.blog.51cto.com/5426657/1718457