Hello, I am struggling to understand the error_page directive behavior:
server { listen 80; listen [::]:80; server_name example.org; location /proxied { return 418 "Host: $host, Connection: $http_connection"; } } server { listen 80; listen [::]:80; server_name example.com; root /var/ious/files; error_page 418 = /error_page.html; proxy_intercept_errors on; location /proxy { proxy_pass http://example.org/proxied; } } Expected behavior: ->Request to http://example.com/proxy -> Sub-request to http://example.org/proxied -> Response HTTP 418 -> Error page for HTTP 418 served http://example.com/error_page.html Observed behavior: -> Request to http://example.com/proxy -> Sub-request to http://example.org/proxied -> Response HTTP 418 -> Error page HTTP 404 (???) The error_page.html file exists in the example.com root directory as any other file. No error message in the error_log file (warn level). I am running nginx v1.8.1. What am I doing/understanding wrong? --- *B. R.*
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx