配置防火墙,开启80端口

配置防火墙,开启80端口
[root@localhost httpd-2.4.6]# vim /etc/sysconfig/iptables
#添加如下规则到22端口这条规则的下面即可
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
#重启防火墙
[root@localhost httpd-2.4.6]# service iptables restart # 或 /etc/init.d/iptables restart
启动Apache
[root@localhost apache2]# cd /usr/local/apache2/bin/
[root@localhost bin]# ./apachectl start

posted @ 2013-10-24 10:29  iyoule  阅读(583)  评论(0编辑  收藏  举报