centOS7安装nginx及nginx配置
按上述步骤启动nginx后查看nginx状态ps -ef | grep nginx如下:

localhost:80无法打开页面一般是防火墙的问题。
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
依次运行然后重新访问即可。
可能是该端口被防火墙拦截
查看开放端口:firewall-cmd --list-ports
开启防火墙8080端口:firewall-cmd --zone=public --add-port=8080/tcp --permanent
再次查看开放端口如下:

centOS7 查看防火墙状态