Apache 如何从授权中排除某些IP
我有以下规则:Apache 如何从授权中排除某些IP,apache,apache2,Apache,Apache2,我有以下规则: <Location /> AuthType Basic AuthName test-server Require valid-user AuthUserFile /etc/apache2/passwd </Location> AuthType Basic AuthName测试服务器 需要有效用户 AuthUserFile/etc/apache2/passwd 但希望从授权过程中排除某些IP地址,因此,如果您是从此类地址
<Location />
AuthType Basic
AuthName test-server
Require valid-user
AuthUserFile /etc/apache2/passwd
</Location>
AuthType Basic
AuthName测试服务器
需要有效用户
AuthUserFile/etc/apache2/passwd
但希望从授权过程中排除某些IP地址,因此,如果您是从此类地址连接的,则不必提交登录名/密码。怎么做?
<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>
AuthType Basic
AuthName测试服务器
需要有效用户
AuthUserFile/etc/apache2/passwd
全盘否定
允许从123.123.123.123开始
满足任何
您还可以使用网络掩码来允许子网络。例如:“Allow from 192.168.100.0/24”将允许192.168.100.1到192.168.100.254之间的所有IP如何允许网站名称@可随机复制的