geew
V2EX  ›  问与答

[nginx] 路径配置

  •  
  •   geew · Sep 11, 2013 · 2327 views
    This topic created in 4715 days ago, the information mentioned may be changed or developed.
    没接触过nginx, 但是这个问题很奇怪
    //配置如下
    location ~ "^/(test2/app|test1|image|comment/\d+|user(/\w+))/?$" {
    include /etc/nginx/proxy.conf;
    proxy_pass_header Server;
    proxy_set_header X-Scheme $scheme;
    limit_except GET HEAD {
    proxy_pass http://img_server;
    }
    proxy_pass http://app_server;
    }

    //结果是:

    /image POST 方法能到img_server
    /comment/34 POST 也能到img_server
    -- test1和test2/app是新加的
    /test1 和 test2/app POST都不能到img_server, 会到app_server

    改了这个配置需要重启nginx吗? 重启了也没啥用, 是什么原因呢

    谢谢了
    3 replies    1970-01-01 08:00:00 +08:00
    geew
        1
    geew  
    OP
       Sep 11, 2013
    人呢? 来啊
    geew
        2
    geew  
    OP
       Sep 12, 2013
    顶上去
    geew
        3
    geew  
    OP
       Sep 13, 2013
    再顶
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1006 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 23:18 · PVG 07:18 · LAX 16:18 · JFK 19:18
    ♥ Do have faith in what you're doing.