Apache 2.2用户权限/公共访问文件夹

website.com:8080被设置为需要密码。 不过,我需要website.com:8080/public才能被任何人访问。

我发现这个例子与Apache 2.3正是我想要的,但我使用2.2和AuthType None不受支持。

<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> 

 <Directory /www/docs/public> Order Allow,Deny Allow from all Satisfy any </Directory> 

“满足任何”意味着即使没有满足“要求有效用户”,“全部允许”也是足够的。

 <Directory /www/docs/public> Order Allow,Deny Allow from all </Directory>