zoukankan      html  css  js  c++  java
  • window nginx 启动无提示错误,却没有listen 80port

    一直使用虚拟机来使用web+hostonly方式;

    今天为了測试一个php平台的window系统兼容性,

    在官方下载了window-nginx 1.9.1版本号;

    解压到文件夹,

    执行nginx.exe

    訪问127.0.0.1正常;

    于是改动nginx.conf把里面的server{}所有删除替换成include ./vhost/*.conf;

    在conf文件夹下建立vhost文件夹同一时候从centos中复制出一个site的server conf文件出来,改动一下root指向的文件夹.保存;

    使用nginx.exe -t測试都OK;

    使用nginx.exe &启动;

    使用127.0.0.1訪问发现无法訪问;

    使用netsat -anb没有发现80port出现;

    查看error.log也没有发现错误.折腾好大一会.没有结论;

    不得已还原nginx.conf,訪问正常;

    再简单的在http{}内部加上include ./vhost/*.conf;

    再訪问127.0.0.1,也是正常的.就是訪问我那个site却不行?

    config test也提示是OK的;

    奇怪了,突发奇想,把vhost中那个conf内容移入nginx.conf试试;

    一移动,使用config test測试就提示:nginx: [emerg] the unix domain sockets are not supported on this platform in upstream "unix:/run/php-fpm/php-fpm.sock" in D:web ginx/conf/nginx.conf:73

    原来是那个server中原来cenots以下的配置无效,可是放到include中却总看不到错误提示,而被忽略这个server导致的;


    所以这里得到结论:这应该是nginx的错误提示的bug,可是我们眼下在配置过程,尽量在nginx.conf的主配置文件上做配置没有问题了,再移入分文件,

    就能够通过错误提示我们一步一步的把配置搞好;

  • 相关阅读:
    day6心得
    安卓下拉刷新和上拉加载的具体实例
    安卓下拉刷新空间SwipeRefreshLayout的基本使用
    fresco的使用教程
    封装安卓的okhttp
    handler更新ui线程的基本用法
    安卓recyclerview的基本使用
    安卓轮播组件
    自定义toolbar教程
    原生toolbar基本使用教程
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/5303759.html
Copyright © 2011-2022 走看看