fastcgi_pass / error page /error code in HTTP rsp

nginxuser100 nginx-forum at nginx.us
Mon Jun 8 21:52:51 UTC 2015


Thank you Maxim, that was what I was looking for. However, it is still not
returning the static error page. Does nginx expect a certain response format
from the fcgi server? I tried:
"HTTP/1.1 400 Bad Request\r\nStatus: 400 Bad Request\r\n";
and 
"HTTP/1.1 400 Bad Request";

The nginx.conf has:
    root ...;
    location xxx {
            include fastcgi_params;
            fastcgi_pass    ...;
            error_page 400 /my_bad_request;  <-- inside or outside this
location block didn't make a difference
            fastcgi_intercept_errors on;
        }

       location /my_bad_request {
            try_files /bad_request.html = 400;
        }

Thank you!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,259436,259446#msg-259446



More information about the nginx mailing list