gpt4 book ai didi

authentication - 如何在 Apache 2.2 中完成 "AuthType None"

转载 作者:行者123 更新时间:2023-12-03 07:13:41 25 4
gpt4 key购买 nike

http://httpd.apache.org/docs/trunk/mod/mod_authn_core.html#authtype谈论“AuthType None”,并且有一个很棒的例子说明了我需要做什么 - 不幸的是,它似乎是 2.3/2.4 的新内容。 2.2 中有同等功能吗?

The authentication type None disables authentication. When authentication is enabled, it is normally inherited by each subsequent configuration section, unless a different authentication type is specified. If no authentication is desired for a subsection of an authenticated section, the authentication type None may be used; in the following example, clients may access the /www/docs/public directory without authenticating:

<Directory /www/docs> 
AuthType Basic
AuthName Documents
AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require valid-user
</Directory>

<Directory /www/docs/public>
AuthType None
Require all granted
</Directory>

最佳答案

像下面这样的东西对我来说适用于 apache 2.2。我取自http://httpd.apache.org/docs/2.2/mod/core.html#require

<Directory /www/docs>
AuthType Basic
AuthName Documents
AuthBasicProvider file
AuthUserFile /usr/local/apache/passwd/passwords
Require valid-user
</Directory>
<Directory /www/docs/public>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>

关于authentication - 如何在 Apache 2.2 中完成 "AuthType None",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2641646/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com