Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
hydrazt
V2EX  ›  Linux

请教个 nginx 配置问题

  •  
  •   hydrazt · Jan 4, 2015 · 3295 views
    This topic created in 4163 days ago, the information mentioned may be changed or developed.
    有什么办法在执行完 echo '[]' 后,直接返回了吗?
    遇到个问题,当 script_a.lua 和 script_b.lua 都匹配的时候, echo '[]'会被覆盖掉

    location ~ ^/ {
    set_by_lua_file $res /etc/nginx/lua/script_a.lua;
    if ($res = 'ok') {
    echo '[]';
    }

    include uwsgi_params;

    set_by_lua_file $res /etc/nginx/lua/script_b.lua;
    if ($res = 'ok') {
    uwsgi_pass upstream_b;
    }

    uwsgi_pass upstream_c;
    }
    4 replies    2015-01-04 17:31:03 +08:00
    msg7086
        1
    msg7086  
       Jan 4, 2015
    return 200;?
    hydrazt
        2
    hydrazt  
    OP
       Jan 4, 2015
    return 200的话,uwsgi的http status就被覆盖了?
    cevincheung
        3
    cevincheung  
       Jan 4, 2015
    break;
    hydrazt
        4
    hydrazt  
    OP
       Jan 4, 2015
    @cevincheung @msg7086 break;可用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   924 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 19:27 · PVG 03:27 · LAX 12:27 · JFK 15:27
    ♥ Do have faith in what you're doing.