![Apache 拒绝所有并通过身份验证授权 IP 地址](https://linux22.com/image/617684/Apache%20%E6%8B%92%E7%BB%9D%E6%89%80%E6%9C%89%E5%B9%B6%E9%80%9A%E8%BF%87%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E6%8E%88%E6%9D%83%20IP%20%E5%9C%B0%E5%9D%80.png)
如何在 Apache 中拒绝任何 IP(除了一个 IP 地址)访问页面,但对该授权 IP 地址进行基本身份验证?谢谢
答案1
/一些/位置/.htaccess
Allow from 149.15.90.70
deny from all
AuthType basic
AuthName "My Protected Page"
AuthBasicProvider file
AuthUserFile /staff/widricd/htpasswd
Require user mint
如何在 Apache 中拒绝任何 IP(除了一个 IP 地址)访问页面,但对该授权 IP 地址进行基本身份验证?谢谢
/一些/位置/.htaccess
Allow from 149.15.90.70
deny from all
AuthType basic
AuthName "My Protected Page"
AuthBasicProvider file
AuthUserFile /staff/widricd/htpasswd
Require user mint