ini apache2允许访问受密码保护的文件夹

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ini apache2允许访问受密码保护的文件夹相关的知识,希望对你有一定的参考价值。

<Directory "/path-to-protected">
	
	AuthType Basic
	AuthName "auth"
	AuthUserFile "/auth-user-file-path"
	require valid-user

	SetEnvIf Request_URI "path-to-allow" allowed_restricted
	
	Order allow,deny
	Allow from 1.2.3.4  # allow from some ips
	Allow from env=allowed_restricted # allow from some urls
	Satisfy any
	
</Directory>

以上是关于ini apache2允许访问受密码保护的文件夹的主要内容,如果未能解决你的问题,请参考以下文章