本文介绍了无法通过http从MS Windows访问CentOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在虚拟环境下安装了CentOS 7。
它有正确的主机名,所以我可以ping它,它有互联网内部,它可以ping通IP和主机名外面。还有它的工作Apache和它的测试页是很好,已经在本地检查。

I have got installed CentOS 7 under virtual envirment.It has proper hostname so I can ping it and it has acccess to internet inside of it and I can ping by IP and host name outside of it. Also It has working Apache and its test page is fine that has been checked locally.

现在我想从MS Windows访问此测试页,但我不能。 (我可以通过IP和主机名ping CentOS。)

Now I would like to get access to this test page from the MS Windows but I cannot. (I can ping CentOS by IP and hostname.)

Iptables firewall

这个链接也没有帮助

我假设一些设置应该在CentOS下更改,但我不知道其中哪些。

I assume some settings should be changed under CentOS but I am not sure which of them.

我的问题是我必须执行哪些步骤

My question is which steps I have to execute to allow all those things?

推荐答案

禁用firewalld.service

Either disable firewalld.service

systemctl disable firewalld.service
systemctl stop firewalld.service

或允许访问端口80

firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --reload

同时禁用SELINUX:

Also disable SELINUX:

setenforce 0
sed -i 's/^SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux

这篇关于无法通过http从MS Windows访问CentOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 22:54