1. 程式人生 > >調整nginx和apache header上限

調整nginx和apache header上限

large_client_header_buffers 
syntax: large_client_header_buffers number size 
default: large_client_header_buffers 4 4k/8k 
context: http, server 
Directive assigns the maximum number and size of buffers for large headers to read from client request. 
The request line can not be bigger than the size of one buffer, if the client send a bigger header
 nginx returns error "Request URI too large" (414). 
The longest header line of request also must be not more than the size of one buffer, otherwise the client get the error "Bad request" (400). 
Buffers are separated only as needed. 
By default the size of one buffer is equal to the size of page, depending on platform this either 4K or 8K, if at the end of working request connection converts to state keep-alive, then these buffers are freed.