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>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章