SuperDataMen 2016-12-21 14:29 采纳率: 0%
浏览 6507

明明 nginx 都正常的 防火墙也关掉的 依然无法正常访问网站


[root@qyj-os nginx]# ./sbin/nginx -t
nginx: the configuration file /www/wdlinux/nginx-1.8.0/conf/nginx.conf syntax is ok
nginx: configuration file /www/wdlinux/nginx-1.8.0/conf/nginx.conf test is successful
[root@qyj-os nginx]# ./sbin/nginx -s stop
[root@qyj-os nginx]# ./sbin/nginx -s start
nginx: invalid option: "-s start"
[root@qyj-os nginx]# ./sbin/nginx
[root@qyj-os nginx]# ps -ef |grep nginx
root      38144      1  0 23:44 ?        00:00:00 nginx: master process ./sbin/nginx
root      38147  31655  0 23:45 pts/1    00:00:00 grep nginx
[root@qyj-os nginx]# netstat -anp | grep nginx
tcp        0      0 0.0.0.0:8090                0.0.0.0:*                   LISTEN      38144/nginx 
[root@qyj-os nginx]# /etc/init.d/iptables
Usage: iptables {start|stop|reload|restart|condrestart|status|panic|save}
[root@qyj-os nginx]# /etc/init.d/iptables status
iptables: Firewall is not running.
[root@qyj-os nginx]#

 worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;


    server {
        listen      8090;
        server_name  localhost;
        location / {
            root   html;
            index  index.html index.htm;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

明明 nginx 都正常的 防火墙也关掉的 为什么 我 连本地 curl 127.0.0.1:8090 都不行 一直卡住 ?

  • 写回答

2条回答 默认 最新

  • Mr子夜 2016-12-26 12:06
    关注

    server {... ...}中root 后面为网页文件的存放地址,请先确认目录存在,并有足够的访问权限
    检查SElinux是否关闭,命令:getenfroce ,暂时关闭SElinux命令:setenfroce 0

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 matlab有关常微分方程的问题求解决
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?
  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考