APACHE 配置文件中文版 httpd.conf FOR Apache 2.2.13

2019-10-15 20:39:50王冬梅

# 将记录在这里。如果你在<VirtualHost>定义了ErrorLog,这些错误信息将记录在你所
# 定义的文件里,而不是这里定义的文件。
#
ErrorLog logs/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
# LogLevel: 控制记录在错误日志文件中的日志信息数量。
# 可能的值包括: debug, info, notice, warn, error, crit, alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
# 下面的参数设置是为CustomLog指令定义格式别名(看下面)。
#
#
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>
# You need to enable mod_logio.c to use %I and %O
#
# 你需要安装了mod_logio.c模块才能使用%I和%O
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
</IfModule>

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# 指定访问日志文件的位置和格式(一般日志格式)。
# 如果你没有在<VirtualHost>内定义这个指令,处理信息将记录在这里,
# 如果你定义了这个指令,则处理信息记录在你指定的位置,而不是这儿定义的位置。
#
CustomLog logs/access.log common

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
# 如果你想要使用一个文件记录access,agent和referer信息(组合日志格式),
# 你可以如下定义这个指令:
#
#CustomLog logs/access.log combined
</IfModule>

<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
#
# Redirect:允许你用一个已存在的域名描述文档,但不能用所有的域名(描述)。
# 客户端将用这个新名称发出一个新的请求。
#
# Example:
# Redirect permanent /foo http://www.kysf.net/bar

#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
#
#Alias: 映射web路径到文件系统路径,通常用于访问不在DocumentRoot里面的内容