当我登录到机器时测试Apache时,它可以工作。
[root@mydomain conf]# telnet mydomain.org 80
Trying ::1...
Connected to mydomain.org.
Escape character is '^]'.
get /
HTTP/1.1 400 Bad Request但是当我试图从另一台计算机连接时,它就失败了。
$ telnet 99.99.99.99 80
Trying 99.99.99.99...
telnet: Unable to connect to remote host: Connection timed out我确信IP是正确的,因为我可以通过SSH登录,nslookup可以工作。
我用http://superuser.com/questions/1114065/ddg#1114151打开ping请求,我也不能平服务器。
$ ping mydomain.org
Pinging mydomain.org [99.99.99.99] with 32 bytes of data:
Request timed out.
Request timed out.
[root@mydomain conf]# ping mydomain.org
PING mydomain (127.0.0.1) 56(84) bytes of data.
64 bytes from mydomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.050 ms我没有和VPS提供商建立防火墙。我只有fail2ban为ssh。我的IP不在拒绝名单中。
我不绑定到httpd.conf中的任何特定IP
Listen 80发布于 2019-01-21 02:11:44
嗯,在我开始安装OpenDKIM之前它就已经开始工作了。我不知道什么改变了,但是我在OpenDKIM安装过程中重新启动,而Apache没有运行,所以我搜索如何使它在引导时启动。我找到了这个https://www.liquidweb.com/kb/how-to-install-apache-on-centos-7/,上面提到了防火墙。一旦我为防火墙启用了80 & 443,它就起作用了。我以前在iptables -L中没有看到任何拒绝这些端口的东西,在我开始安装OpenDKIM之前,我也不知道它是如何工作的。在使用Centos6之前,我从未为Apache启用过防火墙。
sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --permanent --add-port=443/tcphttps://serverfault.com/questions/949992
复制相似问题