Apache运行但没有网站加载

Apache正在我的服务器上正常运行,当我正在对服务器地址进行ping时,我只得到以下内容

PING 45.56.87.123 (45.56.87.123) 56(84) bytes of data 

没有我的网站正在加载,我有一些虚假的http://45.56.87.123/test/index.html但甚至不能访问该页面,

我的iptables:

 [root@localhost test]# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT all -- anywhere anywhere REJECT all -- anywhere loopback/8 reject-with icmp-port-unreachable ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh ACCEPT icmp -- anywhere anywhere LOG all -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: " DROP all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination DROP all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere 

任何帮助我如何让服务器正常运行?

由于我不能添加评论(低声誉),我只是尝试粘贴答案。 基本上连接到您的服务器是超时:

 $ nc -vz 45.56.87.123 443 nc: connect to 45.56.87.123 port 443 (tcp) failed: Connection timed out $ nc -vz 45.56.87.123 80 nc: connect to 45.56.87.123 port 80 (tcp) failed: Connection timed ou 

从我上面看到的iptables规则,我没有注意到任何错误,所以你可以尝试检查你的服务是否先在端口上侦听:

 lsof -i :80 lsof -i :443 

如果不是,那就是你的问题。 如果是的话,你留下防火墙的问题,所以你可以尝试重新启动iptables 。 另外,你正在使用哪个操作系统?

从本地连接工作? 喜欢:

 curl http://45.56.87.123/test/index.html 

要么

 nc -vz 127.0.0.1 80 nc -vz 127.0.0.1 443 

也许你需要添加一个新的站点可用的configuration或更改您的公共文件夹中的.htaccess