【问题标题】:blocking access to my apache server阻止访问我的 apache 服务器
【发布时间】:2011-05-03 22:25:40
【问题描述】:

根据本网站: http://httpd.apache.org/docs/2.2/howto/access.html

我需要使用类似下面的脚本来阻止除特定 IP 地址之外的所有人访问我的网站:

Order deny,allow
Deny from all
Allow from dev.example.com

从那个网站上不清楚,我在哪里输入了这个脚本。

我使用 Ubuntu 10.04 作为我的开发机器。

【问题讨论】:

  • 好吧,那是弗洛伊德的失误;)

标签: apache apache2


【解决方案1】:

写下确切的 IP 或者它的开始部分,包括在允许下的结束点,你就完成了。

Order deny,allow
Deny from all
Allow from 192.168.1.1
Allow from 192.168.1.2
Allow from 10.0.

顺便说一句,属于ServerFault。

【讨论】:

  • 我应该在 .htacess 文件的什么地方输入这个?还是有更好的地方来输入这个?
  • @oshirowanen 是的,在 .htaccess 中。
猜你喜欢
  • 1970-01-01
  • 2016-06-08
  • 2018-02-13
  • 2020-10-24
  • 2013-10-31
  • 2016-12-07
  • 2019-12-18
  • 1970-01-01
  • 2016-03-08
相关资源
最近更新 更多