解决nginx无法访问问题

本地无法访问nginx问题

[root@localhost ]# /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
[root@localhost ]# /etc/init.d/iptables save

[root@localhost ]# /etc/init.d/iptables restart

解决nginx无法访问的问题

1
2
3
4
解决方案-->恢复Nginx默认配置:
cd /usr/local/nginx/conf
rm nginx.conf
cp nginx.conf. default  nginx.conf

  

查看正在监听的所有Tcp端口与Nginx进程

netstat -lntup   查看所有tcp端口监听
ps -ef | grep nginx 查看nginx进程
netstat -unltp|grep nginx 查看nginx端口监听

恢复nginx.conf 默认配置文件,重新启动nginx

/usr/local/nginx/sbin/nginx -s reload 

猜你喜欢

转载自www.cnblogs.com/goodboy321/p/10053548.html