I am new to Nginx, and I successfully configured it on the first day and can access it through a browser.
Reopened the next day and started Nginx, but the browser could not access it.
carried out
ps aux | grep nginx
, The execution result is as follows, indeed the Nginx service has been started.
Then execute
netstat -ntlp
Check whether the 80-port is assigned to Nginx, the execution result is as follows:
Everything is normal, so where is the situation?
After consulting the online information, finally found a solution
The first step is to configure the firewall on port 80:
firewall-cmd --zone=public --add-port=80/tcp --permanent
The second step is to restart the firewall service:
systemctl restart firewalld.service
Then visit your ip in the browser again, you should be able to visit