如何从授权中排除某些IP

时间:2011-01-07 14:05:34

标签: apache apache2

我有以下规则:

<Location />
    AuthType Basic
    AuthName test-server
    Require valid-user
    AuthUserFile /etc/apache2/passwd
</Location>

但是想要从授权过程中排除某些IP地址,因此如果您从这样的地址进行连接,则不必提交登录名/密码。怎么做?

1 个答案:

答案 0 :(得分:11)

<Location />
    AuthType Basic
    AuthName test-server
    Require valid-user
    AuthUserFile /etc/apache2/passwd
    Deny from all
    Allow from 123.123.123.123
    Satisfy any
</Location>