【发布时间】:2012-03-26 13:24:49
【问题描述】:
我在 linux 机器上运行 apache 2.2,我的目标是拥有所有目录,除了带有身份验证的子目录。我可以让“所有”目录工作,但是当我添加子目录以外的目录时,我得到一个内部错误:
configuration error: couldn't check user. No user file?: /download/public/
这是我的配置文件:
<Directory /var/www/mydir/software/download/public>
AuthType None
Require all granted
</Directory>
<Directory /var/www/mydir/software>
AuthType Basic
AuthName download
AuthUserFile /etc/apache2/auth/software
Require valid-user
</Directory>
当我注释掉前四行时,一切正常。通过这些行,我得到了上述错误。
$ apache2 -v
Server version: Apache/2.2.8 (Ubuntu)
问题:我需要更改哪些内容才能在不使用 apache 2.2 进行身份验证的情况下获取子目录。我相信上面的配置是针对2.4的。这就是我想要的 2.2 吗?
【问题讨论】:
-
How to accomplish "AuthType None" in Apache 2.2 的可能重复项(根据接受的答案)