After Nginx is installed successfully, the default page cannot be accessed

After installing Nginx, the Nginx page cannot be accessed

1. Check whether Nginx is started successfully

ps -ef | grep nginx

Check whether nginx starts successfully

2. Check whether the default port 80 is assigned to Nginx

netstat -ntlp

Check whether the default port 80 is assigned to nginx

If the previous steps are normal, it can be judged that the firewall has disabled port 80, and the firewall needs to be set.

3. Configure firewall for port 80

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

4. Restart the firewall

systemctl restart firewalld.service

5. Access the nginx page through ip

Access the nginx page through ip
nginx in Centos starts successfully, but the browser cannot access the default welcome page

Guess you like

Origin blog.csdn.net/qq_44726330/article/details/128639348