Project

General

Profile

Actions

Feature #974

closed

would like something similar to nginx proxy_intercept_errors

Added by yusufg over 17 years ago. Updated about 7 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

nginx has a neat feature in which it can intercept responses with HTTP status code of 400 and higher

http://wiki.codemongers.com/NginxHttpProxyModule#proxy_intercept_errors

The error page handler allows one to change the response status code also

http://wiki.codemongers.com/NginxHttpCoreModule#error_page

here's how one would would redirect 4xx/5xx responses from backend

error_page 401 402 404 /40x.html;
location /40x.html {
root /errors/ ;
}

error_page 502 503 504 /50x.html;
location /50x.html {
root /errors/ ;
}

upstream backend {
server backend2.example.com:8080;
}

location / {
proxy_intercept_errors on;
proxy_pass backend
}

Actions #1

Updated by gstrauss about 7 years ago

  • Description updated (diff)
  • Status changed from New to Patch Pending
  • Assignee deleted (jan)
  • Target version set to 1.4.46
Actions #2

Updated by gstrauss about 7 years ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom