apache配置文件中文翻译

#
# This is the main Apache HTTP server configuration file.  It contains the
这是apache的主配置文件,它包含了给服务的配置指令
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
上面2个网址有更详细的配置指令
#
# Do NOT simply read the instructions in here without understanding
请不要简单的阅读它的介绍在这,不明白他们的作用
# what they do.  They‘re here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
这里只是个作为提示和提醒 如果你不确定,查阅在线文档,已经给你警告过了
#
# Configuration and logfile names: If the filenames you specify for many
  配置和日志文件名:如果文件你指定了(对于大多数服务控制文件)以/或者drive:/
# of the server‘s control files begin with "/" (or "drive:/" for Win32), the
服务顺将使用明确的路径(绝对)
# server will use that explicit path.  If the filenames do *not* begin
如果文件名不是以/开始,服务器的根路径作为起始,
# with "/", the value of ServerRoot is prepended -- so ‘log/access_log‘
因为‘log/access_log‘的路径是/www/log/access_log,
# with ServerRoot set to ‘/www‘ will be interpreted by the
# server as ‘/www/log/access_log‘, where as ‘/log/access_log‘ will be
# interpreted as ‘/log/access_log‘.
而/log/acces_log将被解读为:/log/access_log 根为起始位置

#
# ServerRoot: The top of the directory tree under which the server‘s
# configuration, error, and log files are kept.
服务器根:目录树的最顶层,在下面有服务器的配置文件,错误,日志文件
#
# Do not add a slash at the end of the directory path.  If you point
不要加斜线在目录路径的结尾
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
服务器的根不在本地磁盘,请确定指向一个锁文件指令,你如果希望共享一个根目录为多重的HTTP服务
你最起码需要改变锁文件和PID文件
ServerRoot "/application/apache2.2.29/"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
监听:允许你绑定apache的特殊IP地址或者端口,
# ports, instead of the default. See also the <VirtualHost>
代替默认值,参阅虚拟主机的指令
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
如下面,改变它以防止apache 监听所有范围的IP地址
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
动态的共享对象支持(DSO)
#
# To be able to use the functionality of a module which was built as a DSO you
能使用函数模块(它被DOS方式增加)
# have to place corresponding `LoadModule‘ lines at this location so the
你必需指定一致的加载模块行在这个位置
# directives contained in it are actually available _before_ they are used.
因此指令包含在这,在他们被使用之前,能够被激活
# Statically compiled modules (those listed by `httpd -l‘) do not need
# to be loaded here.
#静态编译的模块,不需要加载在这
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule php5_module        modules/libphp5.so
#

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
如果你希望运行一个不同的用户和组,请启动httpd用root身份,来被始化,然后它将会切换
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
运行httpd的用户和组名,这通常是一个好的惯例,创建一个传用的用户和组为Http服务,象其它大多数的系统服务一样
#
User txidc
Group txidc

</IfModule>
</IfModule>

# ‘Main‘ server configuration
主服务器配置区
#
# The directives in this section set up the values used by the ‘main‘
在这一块的设置的指令值,被主服务器使用,
# server, which responds to any requests that aren‘t handled by a
这些响应被用于任何请示(没有被虚拟主机定义)
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
这些值也可以在虚拟主机容器,以后定义
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
系统管理员:你的地址,当服务器出现部时可以发EMAIL,这个地址出现在服务器的页面
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. [email protected]
#如错误文档
ServerAdmin [email protected]

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn‘t have a registered DNS name, enter its IP address here.
#
ServerName 127.0.0.1:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
#文档根:目录,默认情况下,所有的请求都指向这个目录,但符号链接和别名,有可能指向其它位置
#此处指符号链接,也能作为文档的根地址,
DocumentRoot "/application/apache2.2.29//htdocs"


#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
## 每个可供Apache访问的目录,可以配置成允许和(或)禁止哪些服务和特性(包括其子目录)
# First, we configure the "default" to be a very restrictive set of
# features.  
# 首先,我们定义一个默认的非常严格的配置


<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
从这一点开始,你必需明确的允许特定功能
# particular features to be enabled - so if something‘s not working as
如果一些功能没有象你期待正常工作.务必你已经明确授权在下面
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#这将改变你对DocumentRoot的设置---指下面是DocumentRoot的设置
<Directory "/application/apache2.2.29//htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #允许的配置选项:NONE ALL 或者下面组合


    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn‘t give it to you.
    #注意,“MultiViews”必须被显式的指定,“Options All”不能为你提供这个特性

    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    # options 指令既复杂又重要,请参见 http://httpd.apache.org/docs/2.2/mod/core.html#options
# 获取更多信息。

    Options -Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #重载控制 指令能被放置在htaccess 文件中.它可以是ALL ,NONE 或者 下面的组合关键字 Options FileInfo AuthConfig Limit
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #控制谁能获取资料从这个服务
    Order allow,deny
    Allow from all

</Directory>

<Directory "/data/www/blog">
  # Options -Indexes FollowSymLinks
   Options none
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>


#
# DirectoryIndex: sets the file that Apache will serve if a directory
#目录索引,设置响应的默认文件,当一个目录被请求时.
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.html index.htm
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#下行的几行,阻止htacces和htpasswd 文件 ,被WEB客户端查看
<FilesMatch "^\.ht">    #以.ht开头的文件,会被禁止访问
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

# 错误日志:错误日志文件的位置
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# 如果你没有指定一个错误日志指令在一个虚拟主机内
# container, error messages relating to that virtual host will be
# 错误的消息(与虚拟主机相关的)也将放在记录在这
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# 如果你定义一个错误日志文件 为虚拟主机,
# container, that host‘s errors will be logged there and not here.
# 他的错误日志将记录在那而不在这
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# 日志级别:控制记录到错误日志的消息数量

# Possible values include: debug, info, notice, warn, error, crit,
# 可以的值如下: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.
    #
    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.
    # 如果你喜欢一个日志文件包括访问,代理,和跳转地址信息,你可以使用如下指令
    #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.
    # Example:
      重定向:允许你告诉客户端关于文档(常不存在你的服务空间内),但不是任何的
      客户端在新的地址产生一个新的文档请求
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    # 别名: 映射web路径到文件系统路径,通常用于访问不在DocumentRoot里面的内容
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
    # 如果web路径中有后缀“/”,则服务器要求有后缀“/”来描述URL。你也能需要用 <Directory> 区域提供
    # 允许访问文件系统路径。
    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    # ScriptAlias: 指定包含服务脚本的目录。
    # ScriptAliases本质上与Aliases一样,除了这里的文档在请求时做为程序处理和运行,
    # 而不是作为文档发送到客户端。尾部的“/”规则与Alias一样。
    ScriptAlias /cgi-bin/ "/application/apache2.2.29//cgi-bin/"

</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock logs/cgisock
</IfModule>

#
# "/application/apache2.2.29//cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/application/apache2.2.29//cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# DefaultType: the default MIME type the server will use for a document
# 默认类型: 服务器将为一个文档使用的默认的文档类型
# if it cannot otherwise determine one, such as from filename extensions.
# 如果不能被明确的确定一个,就象来自己文件扩展名
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# 如果你的服务器包含的文件大多数是text/html文档,text/plain将是个不错的参数
# 如果你的内容是2进制,例如应该或者图片,你可能使用:application/octet-stream
# keep browsers from trying to display binary files as though they are
# 以免使客户端试图显示把2进制文件作为文本显示
# text.
#
DefaultType text/plain


<IfModule mod_deflate.c>
    DeflateCompressionLevel 9
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-javascript application/x-httpd-php
</IfModule>

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    # 类型设置指向一个文件,包括一个映射清单(从文件扩展名-MIME类型)
    TypesConfig conf/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #添加类型 允许你添加或者覆盖,MIME设置文件中指定的类型或者文件类型
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    # AddEncoding:允许你对特定的浏览器解压信息在忙碌,不是所有的浏览器都支持这个
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #以上两行表示支持对以.Z和.gz .tgz结尾的文件


    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    # 如果上面的指令被注释掉,你可能要定义些扩展 明确指出媒体类型
    # AddType指令在给定的文件扩展名与特定的内容类型之间建立映射关系
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/x-httpd-php .php .php3
    AddType application/x-httpd-php-source .phps

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # 允许你将特定的扩展名映射到处理器
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# 这个mod_mime_magic 模块允许服务器使用多方面的提示从内容文件来区别类型
# contents of the file itself to determine its type.  The MIMEMagicFile
#  
# directive tells the module where the hint definitions are located.
# 指定告诉模块提示被定义的位置
#MIMEMagicFile conf/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
# 可定制的错误响应在下面3个风格 简单的文本 本地重定身 外部重定向
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# MaxRanges: Maximum number of Ranges in a request before
# 最大的范围:最大的数量范围在一个请求返回所有的资源
# returning the entire resource, or one of the special
#
# values ‘default‘, ‘none‘ or ‘unlimited‘.
# Default setting is to accept 200 Ranges.
# 默认设置接受200范围
#MaxRanges unlimited

#
# EnableMMAP and EnableSendfile: On systems that support it,
# EnableMMAP and EnableSendfile: 在支持的系统上
# memory-mapping or the sendfile syscall is used to deliver
# 内存映射或者发送文件系统调用常被 分发文件
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# 但是当服务来自“网络设定文件系统”时它必须被关闭。或者在你的系统上对于这些功能的支持因为其它原因被破坏
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

# Language settings
#Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。