1. 程式人生 > >centos7下nginx無法訪問

centos7下nginx無法訪問

centos7預設使用firewalld作為防火牆。
  • centos7用的firewalld,我說iptables怎麼沒開。。
  • firewalld預設已經安裝並啟用了,如果需要nginx可以訪問需要執行以下命令:
firewall-cmd --permanent --add-service=http

firewall-cmd --permanent --zone=trusted --add-port=80/tcp


或者關閉防火牆服務:

systemctl stop firewalld