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

明明 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 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题