error_page x 2?

Eden Li eden at hulu.com
Tue Dec 18 10:08:43 MSK 2007


Can you intercept errors twice?  I tried something like the following,
but it still serves the nginx 404 page.  Is there a better way?

server {
  root /data;

  error_page 404 = /fetch$uri;

  location /fetch {
    internal;
    proxy_pass http://backend;
    proxy_intercept_errors on;
    alias /data;
    error_page 404 /404.html;
  }
}





More information about the nginx mailing list