Dummy proxy backends

dobe nginx-forum at nginx.us
Mon Dec 14 15:46:06 MSK 2009


you can use sendfile to achieve this, 

send to backend B first, set the x-accell-redirect header, which then should point to the location of backend A

for example we use this pattern for authentication, additionally you can omit the request body and rewrite the method used to access backend b

    location ^~ "/_backendB" {
 
        proxy_connect_timeout 1;
        proxy_pass http://backendB;
        proxy_intercept_errors on;
        proxy_method GET;
        proxy_pass_request_body off;
        proxy_set_header  Content-Length  '0';
        rewrite /_backendB(.*) $1;
        internal;
        break;
    }

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,30128,30406#msg-30406




More information about the nginx mailing list