Nginx HTTP 414 request-URI too large
On a Nginx server, when accessing a long url, i get error
1 |
HTTP 414 Request-URI Too Large |
To fix the error, edit
1 |
vi /etc/nginx/nginx.conf |
inside “http” section, find
1 |
large_client_header_buffers |
Replace the line with
1 |
large_client_header_buffers 4 32k; |
If your URL is very large, you may need to increase the 32k to higher or reduce the url length.
Large url like this mostly happend due to bad application design, so if possible try to make URL smaller.
Restart nginx
1 |
systemctl restart nginx |
On older servers (centos 6, ubuntu 14, etc..), run
1 |
service nginx restart |