我该如何让我的htaccess文件这两个IP范围? [英] How do I allow these two IP ranges in my htaccess file?
问题描述
我目前允许下列2特定IP地址访问我的开发服务器没有密码:
与AuthType基本
AuthName指令保护区
的AuthUserFile /home/server/htdocs/.htpasswd
目录AuthGroupFile的/ dev / null的
需要有效的用户
订购允许,拒绝
从11.125.19.12允许
从11.59.193.12允许
满足任何
WorldPay的刚才给我发了这两个范围的IP地址 - 我该如何添加这些到我的允许名单?它的工作原理不同的范围?
可能的解决方法1:
与AuthType基本
AuthName指令保护区
的AuthUserFile /home/server/htdocs/.htpasswd
目录AuthGroupFile的/ dev / null的
需要有效的用户
订购允许,拒绝
从11.125.19.12允许
从11.59.193.12允许
允许来自195.35.90
允许来自195.35.91
满足任何
您发布的可能的解决方案将允许范围195.35.90.1 - 195.35.90.255和195.35.91.1 - 195.35.91.255除了11.xxx的IP您允许的。您可以检查出 https://httpd.apache.org/docs/2.2 /mod/mod_authz_host.html#allow 关于允许
指令语法的更多细节。
I currently allow the following 2 specific IP addresses access to my dev server without a password:
AuthType Basic
AuthName "Protected Area"
AuthUserFile /home/server/htdocs/.htpasswd
AuthGroupFile /dev/null
require valid-user
Order allow,deny
Allow from 11.125.19.12
Allow from 11.59.193.12
satisfy any
WorldPay have just sent me these 2 ranges of IP addresses - how do I add those to my allow list? Does it work differently for ranges?
Possible solution 1:
AuthType Basic
AuthName "Protected Area"
AuthUserFile /home/server/htdocs/.htpasswd
AuthGroupFile /dev/null
require valid-user
Order allow,deny
Allow from 11.125.19.12
Allow from 11.59.193.12
Allow from 195.35.90
Allow from 195.35.91
satisfy any
The possible solution you posted will allow the ranges 195.35.90.1 - 195.35.90.255 and 195.35.91.1 - 195.35.91.255 in addition to the 11.x.x.x IPs you allowed. You can check out https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow for more details on the syntax of the Allow
directive.
这篇关于我该如何让我的htaccess文件这两个IP范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!