zoukankan      html  css  js  c++  java
  • IIS与PHP的Nginx坑

    一、*的错

    nginx.conf 测试分站

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        
        server
        {
            listen 80;
            server_name www.test.com;
    
            location / {
                root D:wwwrootwww.test.com;
                index index.php index.html index.htm default.php default.htm default.html; 
            }
        }
        
        server {
            listen       80;
            server_name  localhost;
            location / {
                root   html;
                index  index.html index.htm;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
          } 
        
    }
    
    
     

    经检验/可以,root 指定具体路径也是可以的,然后考虑引入的问题,代码明亮变色

    经更改原来不支持* ,试过不行

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        
        include vhost/www.test.com.conf;
    
        server {
            listen       80;
            server_name  localhost;
            location / {
                root   html;
                index  index.html index.htm;
            }
            error_page   500 502 503 504  /50x.html;
                location = /50x.html {
                    root   html;
                }
          } 
        
    }

     只能具体指定那个才可以,然后还是想试试*匹配

    D:app
    ginx-1.17.8confvhost*.conf
    D:/app/nginx-1.17.8/conf/vhost/*.conf
    D:/app/nginx-1.17.8/conf/vhost/*.conf  #在星号前加个转义

    三种写法均无效

  • 相关阅读:
    WPF 本地化语言设置
    WPF 调节树状图滚动条值
    WPF中ListBox的使用注意事项
    SQL 树状结构表中查出所所有父级/子级
    Vue创建
    wpf 控件注意事项
    链表习题(1)-设计一个递归算法,删除不带头结点的单链表L中所有值为x的结点
    排序-快速排序
    排序-堆排序
    图-图的遍历
  • 原文地址:https://www.cnblogs.com/fger/p/12515137.html
Copyright © 2011-2022 走看看