Apache在子目录取消访问控制

Removing controls in subdirectories

The following example shows how to use the Satisfy directive to disable access controls in a subdirectory of a protected directory. This technique should be used with caution, because it will also disable any access controls imposed by mod_authz_host.
[code gutter="false" highlight="7"]
<Directory /path/to/protected/>
Require user david
</Directory>
<Directory /path/to/protected/unprotected>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>

[/code]

截取自apache 2.2手册http://httpd.apache.org/docs/2.2/mod/core.html#require

This entry was posted in 运维 and tagged , , . Bookmark the permalink.

2 thoughts on “Apache在子目录取消访问控制

  1. auxten says:

    Satisfy Any
    Allow from all
    都要加上,是吧?

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

Note: If you are replying to another commenter, click the "Reply to {NAME} ↵" button under their comment!