next upstream on timeout and 307

dronord dronord at gmail.com
Thu Mar 7 08:26:57 UTC 2024


It's ok?

upstream rest {
    server s1;
    server s2;
}

server {
    listen       80;
    server_name  _;
    root         /usr/share/nginx/html;

    proxy_connect_timeout 3s;
    proxy_read_timeout 3s;

    proxy_intercept_errors on;
    proxy_next_upstream non_idempotent http_500;
    proxy_next_upstream_timeout 3s;

    location / {
        error_page 302 307 500 502 504 = @redirect;
        proxy_pass http://rest;
    }

    location @redirect {
        proxy_pass http://rest;
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20240307/55e9e818/attachment.htm>


More information about the nginx mailing list