์ž์œ ๊ฒŒ์‹œํŒ

  • Nginx : 414 Request-URI Too Large ์˜ค๋ฅ˜

    ํŽ˜์ด์ง€ ์ •๋ณด

    profile_image
    ์ž‘์„ฑ์ž์ฒœ์‚ฌ ์กฐํšŒ 10,065ํšŒ ์ž‘์„ฑ์ผ 2021-08-22 13:57:07 ๋Œ“๊ธ€ 0

    ๋ณธ๋ฌธ

    $ vim /etc/nginx/nginx.conf

    ย 

    client_header_buffer_sizeย 1k; #์ผ๋ฐ˜์ ์ธ ์š”์ฒญ์˜ ํ—ค๋”๋Š” 1kb ๋ฒ„ํผ๋กœ ์ฒ˜๋ฆฌ

    large_client_header_buffersย 4ย 8k; # ํฐ ์š”์ฒญ ์‹œ 4๊ฐœ์˜ 8kb ๋ฒ„ํผ๋กœ ์ฒ˜๋ฆฌ

    ย 

    large_client_header_buffersย 4 32k; # 32k ๋˜๋Š” 64k ๋“ฑ

    ย 

    ์ •๋„๋กœ ์ฒ˜๋ฆฌ

    ย 

    ๋ฐ˜์˜์„ ์œ„ํ•ด์„œย 

    ย 

    nginx -s reload ๋˜๋Š” service nginx restart

    ย 

    ย 

    Syntax: large_client_header_buffersย numberย size;
    Default:
    large_client_header_buffers 4 8k;
    
    Context: http,ย server

    ย 

    Sets the maximumย numberย andย sizeย of buffers used for reading large client request header.

    A request line cannot exceed the size of one buffer, or the 414 (Request-URI Too Large) error

    is returned to the client. A request header field cannot exceed the size of one buffer as well, or

    the 400 (Bad Request) error is returned to the client. Buffers are allocated only on demand.

    By default, the buffer size is equal to 8K bytes.

    If after the end of request processing a connection is transitioned into the keep-alive state, these

    buffers are released.

    ๋Œ“๊ธ€๋ชฉ๋ก

    ๋“ฑ๋ก๋œ ๋Œ“๊ธ€์ด ์—†์Šต๋‹ˆ๋‹ค.