如何用Apache实现ip阻塞
我试图通过ip限制apache 我在我的IP上测试是否通过阻止我自己或只接受另一个IP Apache被重新启动了,我真的不知道是哪个问题 尽管有限制,我仍然可以访问该页面 我在网上找到的所有示例如下:如何用Apache实现ip阻塞,apache,ip-restrictions,Apache,Ip Restrictions,我试图通过ip限制apache 我在我的IP上测试是否通过阻止我自己或只接受另一个IP Apache被重新启动了,我真的不知道是哪个问题 尽管有限制,我仍然可以访问该页面 我在网上找到的所有示例如下: <Location /home> SetEnvIf X-Forwarded-For ^xxx\.xxx\.xxx\.xxx access Order allow,deny Satisfy Any Allow from en
<Location /home>
SetEnvIf X-Forwarded-For ^xxx\.xxx\.xxx\.xxx access
Order allow,deny
Satisfy Any
Allow from env=access
</Location>
<Location /home>
Order Deny,Allow
Deny from All
Allow from xxx.xxx.xxx.xxx
Deny from All
Satisfy Any
</Location>
<ProxyMatch "/home/*" >
Order Deny,Allow
Deny from all
Allow from xxx.xxx.xxx.xxx
</ProxyMatch>
<LocationMatch "/home">
Order Allow,Deny
Allow from all
SetEnvif X-Forwarded-For "xxx\.xxx\." DenyAccess
Deny from env=DenyAccess
</LocationMatch>
<Location "/home">
Order Allow,Deny
Allow from all
SetEnvIf X-Forwarded-For ^xxx\.xxx\. denyAccess
Deny from env=denyAccess
</Location>
<Location "/home">
SetEnvIf X-Forwarded-For ^xxx\.xxx\. access
Order allow,deny
Satisfy Any
Allow from env=access
</Location>
setenif X-Forwarded-For ^xxx\.xxx\.xxx\.xxx访问
命令允许,拒绝
满足任何
允许来自环境=访问
命令拒绝,允许
全盘否定
允许从xxx.xxx.xxx.xxx开始
全盘否定
满足任何
命令拒绝,允许
全盘否定
允许从xxx.xxx.xxx.xxx开始
命令允许,拒绝
通融
SetEnvif X-Forwarded-For“xxx\.xxx\.”登入
拒绝来自env=DenyAccess
命令允许,拒绝
通融
setenif X-Forwarded-For ^xxx\.xxx\。登革热
拒绝来自env=denyAccess
setenif X-Forwarded-For ^xxx\.xxx\。通道
命令允许,拒绝
满足任何
允许来自环境=访问
谢谢您可以通过不需要ip xxx.xxx.xxx.xxx指令来完成
此处的文档:Apache2.4使用
Require
<Files /home>
Require all granted
Require not ip xx.xx.xx.xx
</Files>
要求所有授权
不需要ip xx.xx.xx.xx
我使用Apache2.2,我尝试了Require,但没有帮助。也许这是我重写mod_的原因,但我真的不知道这可能是什么。您发布的大多数示例仅与您在代理服务器后面时相关。你在代理服务器后面吗?你到底把这些指令放在哪里?