配置防火墙,开启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
转载于:https://www.cnblogs.com/iyoule/p/3385541.html