Nginx returning 414 even when large_client_header_buffers is set

spacerobot nginx-forum at nginx.us
Tue Apr 10 20:26:25 UTC 2012


> Most likely you are trying to configure 
> client_header_buffer_size/large_client_header_buff
> ers in a pure 
> virtual server{}.  This won't work as request
> headers parsing 
> happens before Host header is known (and virtual
> server is 
> selected), hence parseing happens in a context of
> the default 
> server for a listen socket.
> 
> You have to configure
> client_header_buffer_size/large_client_header_buff
> ers 
> in a default server (or at http level).
> 

I tried to set it in the http context of the main /etc/nginx/nginx.conf
file:

http {
  large_client_header_buffers  8  512k;

  ...
  include /etc/nginx/sites-enabled/*;
}

And my server contexts are defined in a conf file in sites-enabled. But
large_client_header_buffers still appears to be ignored.

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



More information about the nginx mailing list