O'Reilly logo

Nginx HTTP Server - Second Edition by Clement Nedelcu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

400 Bad Request

Occasionally, you may run into a recurring issue with some of your websites: Nginx returns 400 Bad Request error pages to random visitors, and this only stops happening when visitors clear their cache and cookies. The error is caused by an overly large header field sent by the client. Most of the time this is when cookie data exceeds a certain size. In order to prevent further trouble, you may simply increase the value of the large_client_header_buffers directive in order to allow larger cookie data size:

large_client_header_buffers 4 16k;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required