Linux开启80端口却无法访问
- 本人使用阿里云服务器,以阿里云服务器为例子
- 首先需要配置阿里云安全组 开放端口
2.关闭firewalld 与iptables防火墙 或开通端口 如果怕不安全开通即可
- 关闭命令
systemctl stop firewalld //关闭firewalld防火墙
service iptables stop //关闭iptables 防火墙
- 放通命令
iptables -I INPUT -p tcp --dport 80 -j ACCEPT //在iptables 放通端口
firewall-cmd --zone =public --add-port=80/tcp --permanent //在firewall 放通端口
关于防火墙问题附上一篇文章 链接: 防火墙相关概念
讲的特别详细
我是在iptables没有开放80端口,所以导致无法访问