apache配置问题

由 cxwd 在 05-09-2003 20:02 发表:

apache配置问题

如何只允许想要的几段ip访问主页呢??如何设置啊!

求救啊!!!!


由 tianfeng 在 05-09-2003 20:33 发表:


在apache的配置文件httpd.conf里面可以设置允许那些主机访问主页!


我们是茁壮成长的linux菜鸟!


由 dsj 在 05-09-2003 21:46 发表:


编辑文件/etc/httpd/conf

在〈directory "/usr/local/web/apache/cgi-bin">里Allow from后输入网段


由 enigma0702 在 05-09-2003 22:03 发表:


也可以使用iptables

iptables -t filter -A INPUT -s 192.168.0.1-192.168.0.5 -p tcp --dport http -j ACCETP

iptables -t filter -A INPUT -s 192.168.0.1-192.168.0.5 -m state --state ESTABLISHED , RELATED -j ACCEPT

iptables - t filter -P INPUT DROP

这样只有192.168.0.1到192.168.0.5的

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus