centos nginx配置完成无法访问

Centos7 默认使用firewalld作为防火墙、firewalld默认安装并处于启用状态,nginx安装配置完成,需要访问有如下两种解决办法:

  1. 第一种执行如下命令
    firewall-cmd --permanent --add-service=http
    firewall-cmd --permanent --zone=trusted --add-port=80/tcp
    firewall-cmd --reload
    
  2. 第二种关闭防火墙服务
    systemctl stop firewalld
    

猜你喜欢

转载自blog.csdn.net/liuxiaoming1109/article/details/85042153
今日推荐