##################接上篇<Apache2的httpd.conf翻譯三>#################
#
#
# AddType允許你為指定的文件類型添加或覆蓋mime.types文件中配置的MIME
#
AddType application/x-tar .tgz
AddType image/x-icon .ico
#
# AddHandler允許你映射確定的文件擴(kuò)展名到“handlers”:
# 與文件類型無關(guān)的行為。這既能編譯到服務(wù)器中也可以添加到Action指令
# 中(看下面)。
# 為了在ScriptAliased指令指定的以外使用CGI腳本:
#(要使它可用,你還需要在Options中添加“ExecCGI”。
#
# AddHandler cgi-script .cgi
#
# 對于那些包含他們自己的HTTP頭的文件
#
# AddHandler send-as-is asis
#
# 對于server-parsed imagemap文件:
#
# AddHandler imap-file map
#
# agemap 文件:
#
#AddHandler imap- 文件映像
#
# 對于類型映像轉(zhuǎn)移資源)
#(這是默認(rèn)的設(shè)定以允許Apache的“It Worked”頁能多種語言分發(fā))。
#
AddHandler type-map var
#
# 過濾器允許你在將它發(fā)送到客戶端前進(jìn)行處理。
#
# 為了在服務(wù)器端分析包含(SSI)的.shtml文檔:
# (要執(zhí)行這個指令,你還需要在Options指令中添加“Includes”。)
#
# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml
#
# Action讓你定義當(dāng)調(diào)用匹配的媒體文件時將要執(zhí)行的腳本。這將減少
# 那些經(jīng)常使用的CGI腳本的URL路徑名的重復(fù)輸入。
# 格式:Action media/type /cgi-script/location
# 格式:Action handler-name /cgi-script/location
#
#
# 可配置的錯誤應(yīng)答有三種風(fēng)格:
# 1)plain text 2)local redirects 3) external redirects
#
# 一些示例:
# 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
#
#
# 綜合應(yīng)用這些指令,我們可以創(chuàng)建一個國際化的出錯應(yīng)答。
#
# 我們使用Alias來重定向任意/error/HTTP_<error>.html.var應(yīng)答到
# 我們的多語言錯誤消息集合。使用正確的文本替代它。
#
# 通過加入下面的行,你就能夠改變這些消息的顯示,而不必改變
# HTTP_<error>.html.var文件。
#
# Alias /error/include/ "/your/include/path/"
#
# 以將/usr/local/apache2/error/include/下的文件拷貝到/your/inclue/path/下
# 開始,你可以創(chuàng)建你自己的文件集合,甚至是其于每個虛擬主機(jī)的。
# 不管你的ServerSignature如何設(shè)置,默認(rèn)的包含文件將顯示你的
# Aapche版本號和你的ServerAdmin郵件地址
#
# 國際化的錯誤文檔需要mod_alias,mod_include和mod_negotiation三個
# 模塊。要激活它們,取消下面30行的注釋符號
# Alias /error/ "/usr/local/apache2/error/"
#
# <Directory "/usr/local/apache2/error">
# AllowOverride None
# Options IncludesNoExec
# AddOutputFilter Includes html
# AddHandler type-map var
# Order allow,deny
# Allow from all
# LanguagePriority en de es fr it nl sv
# ForceLanguagePriority Prefer Fallback
# </Directory>
#
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error.php
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
#
# 下面的命令更改標(biāo)準(zhǔn)的HTTP應(yīng)答行為以處理己知的瀏覽器問題。
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# 下面命令關(guān)閉對那些沒有尾部“/”的目錄的非GET請求的重定向,
# 這些命令修復(fù)了微軟的采用DAV方法不能正確處理重定向的WEB文件夾的問題。
# Apple下的DAV文件系統(tǒng)和Gnome下的VFS對DAV的支持也是采用這樣的方法
# 進(jìn)行處理的。
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
#
# 允許你使用URL:http://servername/server-status來通過mod_status生
# 成并報告服務(wù)器狀態(tài)信息。改變.example.com為你自己的域名。
#
# <Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from .example.com
# </Location>
#
# 允許使用URL:http://servername/server-info來遠(yuǎn)程報告服務(wù)器配置信息
# (需要mod_info.c支持)。改變“.example.com”為你自己的域名。
#
# <Location /server-info>
# SetHandler server-info
# Order deny,allow
# Deny from all
# Allow from .example.com
# </Location>
#
# 代理服務(wù)器命令,去掉下面的行使代理服務(wù)可用。
#
# <IfModule mod_proxy.c>
# ProxyRequests On
# <Proxy *>
# Order deny,allow
# Deny from all
# Allow from .example.com
# </Proxy>
#
# 安裝或關(guān)閉HTTP/1.1“通道”頭處理。
# (“Full”添加服務(wù)器版本信息,“Block”移掉所有輸出“通道”頭信息。
# 可以設(shè)為下面各選項之一:Off | On | Full | Block
#
# ProxyVia On
# 最好為代理服務(wù)安裝高速緩沖,去掉下面幾行的注釋符號:
# (沒有CacheRoot則不緩沖)
#
# CacheRoot "/usr/local/apache2/proxy"
# CacheSize 5
# CacheGcInterval 4
# CacheMaxExpire 24
# CacheLastModifiedFactor 01
# CacheDefaultExpire 1
# NoCache a-domain.com another-domain.edu joes.garage-sale.com
# </IfModule>
# 代理命令結(jié)束。
#
# 附加的特定模塊配置。
#
<IfModule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
## 第三區(qū):虛擬主機(jī)
#
# VirtualHost:你可以通過設(shè)置虛擬主機(jī)容器以實現(xiàn)在你的主機(jī)上保有多個
# 域名/主機(jī)名。大多數(shù)配置信息只使用基于名字的虛擬主機(jī),因此服務(wù)器
# 不必?fù)?dān)心IP地址的問題,下面的命令以*號代替虛擬主機(jī)名。
#
# 在你試著配置你的虛擬主機(jī)以前,請參見
# URL:http://httpd.apache.org/docs-2.0/vhosts/>以取得更多的信息。
#
# 你可以使用命令行選項“-S”來檢驗?zāi)愕奶摂M主機(jī)配置。
#
# 使用基于名字的虛擬主機(jī)。
#
# NameVirtualHost *
#
# 虛擬主機(jī)示例:
# 幾乎所有的Apache命令都可以在虛擬主機(jī)容器中使用。
# 第一個虛擬主機(jī)區(qū)是用于向服務(wù)名未知的請求進(jìn)行應(yīng)答的配置。
#
# <VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log commom
# </virtualHost>
posted on 2006-04-22 20:27
LORD BLOG 閱讀(243)
評論(0) 編輯 收藏 所屬分類:
Application Server