How to set the allowed url length for a nginx request (error code: 414, uri too large)

后端 未结 2 1286
执笔经年
执笔经年 2020-11-28 05:38

I am using Nginx in front of 10 mongrels.

When I make a request with size larger then 2900 I get back an:

error code 414: uri too large

2条回答
  •  无人及你
    2020-11-28 06:15

    For anyone having issues with this on https://forge.laravel.com, I managed to get this to work using a compilation of SO answers;

    You will need the sudo password.

    sudo nano /etc/nginx/conf.d/uploads.conf
    

    Replace contents with the following;

    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    
    client_max_body_size 24M;
    client_body_buffer_size 128k;
    
    client_header_buffer_size 5120k;
    large_client_header_buffers 16 5120k;
    

提交回复
热议问题