tags:

views:

19

answers:

1

I'm trying to configure nginx (0.7.65) so it'll proxy to server A, and if it gets 404 will try to proxy to server B.

I've tried the following, but it doesn't work. Any ideas?

    server {
    error_log  /tmp/nginx.error.log;
    access_log   /tmp/nginx.access.log;
    listen 4433;
    server_name localhost;

    location / {
        proxy_pass http://localhost:5984;
        error_page 404 = @fallback;
    }

    location @fallback {
        proxy_pass http://localhost:5983;
    }
}
A: 
    proxy_intercept_errors on;
lazy1