I have the nginx server running fine with this config.
server {
location / {
proxy_pass http://127.0.0.1:8000;
}
}
but when I try and modify buffer size it fails.
server {
location / {
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;
proxy_pass http://127.0.0.1:8000;
}
}
I get this error
Reloading nginx configuration: nginx: [emerg] "client_header_buffer_size" directive is not allowed here
Any suggestions?
The client_header_buffer_size
is not available within the "location" context. You'll also need to move the large_client_header_buffers
Move them to within the "server" context and it'll work.
server {
client_header_buffer_size 1k;
large_client_header_buffers 2 1k;
location / {
client_body_buffer_size 10K;
client_max_body_size 8m;
proxy_pass http://127.0.0.1:8000;
}
}
Ref: http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With