Dec 182013

In my recent FreeNAS blog post, I couldn’t access the FreeNAS web GUI with the Google Chrome Browser. Trying to access a page would present a 400 Bad Request - request header or cookie too large error.

After doing some research online, I found out that the way to solve this issue was to modify the nginx configuration to allow for large headers.

As this was FreeBSD, the configuration file for nginx was located at /etc/local/nginx/nginx.conf. In a Linux distribution, the file would likely be located in /etc/nginx/nginx.conf
In that file, we need to add this line within the server stanza.
large_client_header_buffers 4 16k;

I’ve modified my nginx.conf file so now it look like this –

server {
server_name localhost;

large_client_header_buffers 4 16k;

After modifying the configuration file, nginx needs to be restarted.
On FreeBSD, the command to restart nginx is /usr/local/etc/rc.d/nginx restart
On Linux, the command varies by distribution, but in general would be something like /etc/init.d/nginx restart

After restarting nginx, I was able to access the FreeNAS web interface with the Chrome Browser