zoukankan      html  css  js  c++  java
  • 解决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 
  • 相关阅读:
    python
    python
    python
    python
    python
    python
    python
    python
    人生苦短,我用python,为什么选择python,python简介
    Mysql-查询
  • 原文地址:https://www.cnblogs.com/goodboy321/p/10053548.html
Copyright © 2011-2022 走看看