在上一篇文章中《详解apache的配置文件httpd.conf》对一下基本参数进行了描述,拆分几个参数:
指令:Options
		
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Description:    Configures what features are available in a particular directory Syntax:    Options [+|-]option [[+|-]option] ... Default:    Options FollowSymlinks Context:    server config, virtual host, directory, .htaccess Override:    Options Status:    Core Module:    core Compatibility:    The default was changed from All to FollowSymlinks in 2.3.11 说明    配置在特定目录中可以使用哪些特性 语法    Options [+|-]option [[+|-]option] ... 默认值    Options All 作用域    server config, virtual host, directory, .htaccess 覆盖项    Options 状态    核心(C) 模块    core | 
说明:
| 0 1 2 3 4 5 6 7 8 9 | option可以为None ,在这种情况下,将不启用任何额外特性。或设置为以下选项中的一个或多个: All:除MultiViews之外的所有特性。这是默认设置。 ExecCGI:允许使用mod_cgi执行CGI脚本。 FollowSymLinks:服务器允许在此目录中使用符号连接。 如果此配置位于<Location>配置段中,则此设置会被忽略 Includes:允许使用mod_include提供的服务器端包含。 IncludesNOEXEC:允许服务器端包含,但禁用"#exec cmd"和"#exec cgi"。但仍可以从ScriptAlias目录使用"#include virtual"虚拟CGI脚本。 Indexes:如果一个映射到目录的URL被请求,而此目录中又没有DirectoryIndex(例如:index.html),那么服务器会返回mod_autoindex生成的一个格式化后的目录列表。 MultiViews:允许使用mod_negotiation提供内容协商的"多重视图"(MultiViews)。 SymLinksIfOwnerMatch:服务器仅在符号连接与其目的目录或文件的拥有者具有相同的uid时才使用它。 如果此配置出现在<Location>配置段中,此选项将被忽略。 注意:使用 -IncludesNOEXEC 或 -Includes 时,不论前面如何设置,都会完全禁用服务器端包含。 | 
指令:AllowOverride
| 0 1 2 3 4 5 6 7 8 9 10 11 | Description:    Types of directives that are allowed in .htaccess files Syntax:    AllowOverride All|None|directive-type [directive-type] ... Default:    AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier) Context:    directory Status:    Core Module:    core 说明    确定允许存在于.htaccess文件中的指令类型 语法    AllowOverride All|None|directive-type [directive-type] ... 默认值    AllowOverride All 作用域    directory 状态    核心(C) 模块    core | 
说明:
| 0 1 2 3 4 5 6 | AllowOverride仅在不包含正则表达式的<Directory>配置段中才是有效的。在<Location>, <DirectoryMatch>, <Files>配置段中都是无效的。 AuthConfig:允许使用与认证授权相关的指令(AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, AuthType, AuthUserFile, Require, 等)。 FileInfo:允许使用控制文档类型的指令(DefaultType, ErrorDocument, ForceType, LanguagePriority, SetHandler, SetInputFilter, SetOutputFilter, mod_mime中的 Add* 和 Remove* 指令等等)、控制文档元数据的指令(Header, RequestHeader, SetEnvIf, SetEnvIfNoCase, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, CookieTracking, CookieName)、mod_rewrite中的指令(RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule)和mod_actions中的Action指令。 Indexes:允许使用控制目录索引的指令(AddDescription, AddIcon, AddIconByEncoding, AddIconByType, DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, 等)。 Limit:允许使用控制主机访问的指令(Allow, Deny, Order)。 Options[=Option,...]:允许使用控制指定目录功能的指令(Options和XBitHack)。可以在等号后面附加一个逗号分隔的(无空格的)Options选项列表,用来控制允许Options指令使用哪些选项。 例如以下指令只允许在.htaccess中使用AuthConfig和Indexes组的指令:AllowOverride AuthConfig Indexes  | 
指令:Require
| 0 1 2 3 4 5 6 7 8 9 10 11 | Description:    Tests whether an authenticated user is authorized by an authorization provider. Syntax:    Require [not] entity-name [entity-name] ... Context:    directory, .htaccess Override:    AuthConfig Status:    Base Module:    mod_authz_core 说明    指定哪些认证用户允许访问该资源 语法    Require entity-name [entity-name] ... 作用域    directory, .htaccess 覆盖项    AuthConfig 状态    Base 模块    mod_authz_core | 
Order指令:
| 0 1 2 3 4 5 6 7 8 9 10 11 12 13 | Description:    Controls the default access state and the order in which Allow and Deny are evaluated. Syntax:    Order ordering Default:    Order Deny,Allow Context:    directory, .htaccess Override:    Limit Status:    Extension Module:    mod_access_compat 说明    控制默认的访问状态与Allow和Deny指令生效的顺序 语法    Order ordering 默认值    Order Deny,Allow 作用域    directory, .htaccess 覆盖项    Limit 状态    扩展 模块    mod_authz_host | 
说明:
| 0 1 2 3 | Order指令控制默认的访问状态与Allow和Deny指令生效的顺序。Ordering取值范围是以下几种范例之一: Deny,Allow:Deny指令在Allow指令之前被评估。默认允许所有访问。任何不匹配Deny指令或者匹配Allow指令的客户都被允许访问。 Allow,Deny:Allow指令在Deny指令之前被评估。默认拒绝所有访问。任何不匹配Allow指令或者匹配Deny指令的客户都将被禁止访问。 Mutual-failure:只有出现在Allow列表并且不出现在Deny列表中的主机才被允许访问。这种顺序与"Order Allow,Deny"具有同样效果,不赞成使用。  | 
例子:仅允许172.28.95.116访问
| 0 1 | Order Allow,Deny Allow from 172.28.95.116 | 
例子:仅拒绝172.28.95.116访问
| 0 1 | Order Deny,Allow Deny from 172.28.95.116 | 
例子:所有都不通过
| 0 1 | Order allow,deny    #此条默认包含拒绝所有 deny from 172.28.95.116 | 
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
 
							
