新浪博客

nginx启动后,访问不到80端口

2022-04-20 10:24阅读:
第二个问题:
访问不了80端口
1、确定是否开启了80端口
[root@localhost conf]# firewall-cmd --list-ports
6379/tcp 8848/tcp
2、检查防火墙状态
[root@localhost conf]# systemctl status firewalld
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: active (running) since 三 2022-04-20 09:17:41 CST; 59min ago
Docs: man:firewalld(1)
Main PID: 681 (firewalld)
CGroup: /system.slice/firewalld.service
└─681 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
4月 20 09:17:35 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
4月 20 09:17:41 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
3、防火墙关闭的话,开启
[root@localhost conf]# systemctl start firewalld
4、添加端口
[root@localhost
conf]# firewall-cmd --zone=public --add-port=80/tcp --permanent
success
5、重启防火墙
[root@localhost conf]# firewall-cmd --reload
success
6、检查端口
[root@localhost conf]# firewall-cmd --list-port
6379/tcp 8848/tcp 80/tcp

我的更多文章

下载客户端阅读体验更佳

APP专享