我已经在虚拟环境下安装了CentOS 7。
它有正确的主机名,所以我可以ping它,它里面有访问internet的权限,我可以ping它外面的IP和主机名。此外,它还可以运行Apache,并且它的测试页面可以在本地检查。
现在我想从MS Windows访问此测试页,但我不能。(我可以通过IP和主机名ping CentOS。)
Iptablesfirewall有关吗?
linux - 无法通过http从MS Windows访问CentOS-LMLPHP
这个链接也没有帮助https://serverfault.com/questions/459267/enabling-http-access-on-port-80-for-centos-6-3-from-console
我想有些设置应该在CentOS下更改,但我不确定是哪一个。
我的问题是我必须执行哪些步骤才能允许这些事情发生?

最佳答案

禁用firewalld.service

systemctl disable firewalld.service
systemctl stop firewalld.service

或允许访问端口80
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

同时禁用SELINUX:
setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux

关于linux - 无法通过http从MS Windows访问CentOS,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34067552/

10-15 14:15