在Apache中,我已经设置了/受保护位置的基本身份validation。 现在我需要绕过一个特定的IP地址的身份validation,但保持身份validation完好无损。 任何人都可以指导我这一个。 这是我目前的身份validation保护位置片段。
<Location "/protected"> Order allow,deny Allow from all AuthName "Protected folder" AuthType Basic AuthUserFile /etc/htpasswd require valid-user </Location>
您使用使用Satisfy Any :
Order deny,allow allow from 1.2.3.4 deny from all Satisfy Any AuthType Basic AuthName "private area" AuthUserFile /path/to/htpasswd Require valid-user