Problem description:
Installing centos7 in VMware and completing nginx installation and configuration, the host cannot be accessed.
Cause analysis:
The virtual machine does not allow Nginx default port 80.
Solution:
First, open port 80
firewall-cmd --permanent --add-port=80/tcp
Then restart the firewall
firewall-cmd --reload
Recommended tutorial: centos tutorial
The above is the detailed content of What should I do if nginx cannot be accessed under centos?. For more information, please follow other related articles on the PHP Chinese website!