large_client_header_buffers: Custom error pages are not working

prajos nginx-forum at
Tue Jun 5 13:14:16 UTC 2018

Thanks Maxim Dounin,
The trick worked.
I did something like the following:

server {
large_client_header_buffers 12 64;
error_page 494 =400 /400.json;
error_page 400 /400.json;

location = /400.json {
        add_header Funky-Header1 'Funky Value' always;
        root /etc/nginx/error-files/;
        allow all;
& now I'm able to get my custom message and Header.


Posted at Nginx Forum:,280035,280044#msg-280044

More information about the nginx mailing list