Hello...

I have the following issue...

Is it possible to use "proxy_intercept_errors on" with @location?

Invalid config:
  location /images/ {
    proxy_intercept_errors on;
    try_files $uri @backend;
  }
  location / {
    try_files $uri @backend;
  }
  location @backend {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_redirect off;
    proxy_pass http://my_upstream;
  }

The only valid configuration I've found to intercept errors is not
using the @location but I want to use it to simplify the
configuration.

Valid config:
  location /images/ {
    proxy_intercept_errors on;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_redirect off;
    proxy_pass http://my_upstream_config;
  }
  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_redirect off;
    proxy_pass http://my_upstream;
  }

Thanks in advance.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to