[root@rh9 root]# grep LogFormat /etc/httpd/conf/httpd.conf
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
3)
LogFormat
此选项用来定义“CustomLog”指令中使用的格式名称,以下是系统默认的格式,可以
直接使用这些默认值。
4)
CustomLog
此选项可以用来设置记录文件的位置和格式,默认值是:“CustomLog logs/access_log
combined”。
5)
PidFile
用于指定存放 httpd 主(父)进程号的文件名,便于停止服务。其默认值是:“PidFile
run/httpd.pid”。
4.
容器与访问控制指令
1) 容器指令简介
容器指令通常用于封装一组指令,使其在容器条件成立时有效,或者用于改变指令的作用
域。容器指令通常成对出现,具有以下格式特点:
<容器指令名 参数>
</容器指令名>
例如:
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
<ifModule>容器用于判断指定的模块是否存在,若存在(被静态地编译进服务器,或是
被动态装载进服务器),则包含于其中的指令将有效,否则会被忽略。此处的配置指令的含
义是:若mod_ssl.c 模块存在,则用Include 指令,将conf/ssl.conf 配置文件包含进当前的配
置文件中。
<IfModule>容器可以嵌套使用。若要使模块不存在时所包含的指令有效,只需在模块名
前
加一个“!”即可。比如配置文件中的以下配置:
<IfModule ! mpm_winnt.c>
<IfModule ! mpm_netware.c>
User nobody
</IfModule>
</IfModule>
除了<IfModule>容器外,Apache 还提供了<nrectory> 、<Files>、<Location>、<VirtualHost>
等容器指令。其中,<VirtualHost>用于定义虚拟主机;<Directory>、<Files>、<Location>等
容器指令主要用来封装一组指令,使指令的作用域限制在容器指定的目录、文件或某个以
SIGTERM
[Mon Nov 09 14:11:21 2009] [notice] caught SIGTERM, shutting down
--More--(25%)