Apache HTTP最新官方配置(中译版[3])

类别:网站制作 点击:0 评论:0 推荐:
上接[2]

所有这些指令将出现在<VirtualHost>容器中,这些设定值将在定义virtual host时被覆写。

#

 

#

# ServerAdmin: Your address, where problems with the server should be

# e-mailed.  This address appears on some server-generated pages, such

# as error documents.  e.g. [email protected]

# ServerAdmin:你的地址,当系统故障时,可以给你发email。此地址出现在那些由服务器生成的页面上,如出错文档。例如:[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.

#ServerNaem定义了server名称和端口号,用以标明自己的身份。通常可以自动定义,建议显式地定义,避免起动时出错

# If this is not set to valid DNS name for your host, server-generated

# redirections will not work.  See also the UseCanonicalName directive.

#如果没有正确定义主机的DNS,服务器产生的重定向将不会工作,同时参考UseCanonicalName指令。

# If your host doesn't have a registered DNS name, enter its IP address here.

# You will have to access it by its address anyway, and this will make

# redirections work in a sensible way.

#如果你没有注册DNS名字,请在这里输入IP地址。

你可以在任何情况下使用ip地址,这也使用得重定向变得敏感

ServerName www.moers.com:80

 

#

# UseCanonicalName: Determines how Apache constructs self-referencing

# URLs and the SERVER_NAME and SERVER_PORT variables.

# When set "Off", Apache will use the Hostname and Port supplied

# by the client.  When set "On", Apache will use the value of the

# ServerName directive.

#UseCanonicalName:决定Apaceh如何构建自定参考URL,和SERVER_NAME及SERVER_PORT变量

当设为Off时,Apache将使用客户端给出的域名和端口。当设为On时,Apache将使用ServerName指令

UseCanonicalName Off

 

#

# 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:服务器文档放置目录。在默认情形下,所有的请求都从这里开始,除了记号和别名将改指它处以外。

DocumentRoot "C:/Program Files/Apache Group/Apache2/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

</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的设置

<Directory "C:/Program Files/Apache Group/Apache2/htdocs">

 

#

# Possible values for the Options directive are "None", "All",

# or any combination of:

可能的值为None,All或者任意组合

#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

# 索引包括FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

# 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.0/mod/core.html#options

# for more information.

#选项指令既复杂又重要,请参阅http://httpd.apache.org/docs-2.0/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

#AllowOverride 控制什么指令能够加入到.htaccess中,可以是All,None,或者组合关键字

    AllowOverride None

 

#

# Controls who can get stuff from this server.

#控制谁可以可以访问此服务

    Order allow,deny

    Allow from all

 

</Directory>

 

#

# UserDir: The name of the directory that is appended onto a user's home

# directory if a ~user request is received.  Be especially careful to use

# proper, forward slashes here.  On Windows NT, "Personal/My Website"

# is a more appropriate choice.

# UserDir: 用户的home的名称,当接到到~user的请求时。

请小心正确使用”/”. 在WinNT上,”Personal/My Website”是更合适的选择

UserDir "My Documents/My Website"

 

#

# Control access to UserDir directories.  The following is an example

# for a site where these directories are restricted to read-only.

#控制UserDir目录,以下是一个例子,这个目录是只读的

# You must correct the path for the root to match your system's configured

# user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"

# or whichever, as appropriate.

#你必须更正root目录,与系统设置相配,如用户目录是C:/WinNT/profiles/*/My Documents/My Website或者其它合适的

#<Directory "C:/Documents and Settings/*/My Documents/My Website">

#    AllowOverride FileInfo AuthConfig Limit

#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

#    <Limit GET POST OPTIONS PROPFIND>

#        Order allow,deny

#        Allow from all

#    </Limit>

#    <LimitExcept GET POST OPTIONS PROPFIND>

#        Order deny,allow

本文地址:http://com.8s8s.com/it/it30852.htm