LoginSignup
167
137

More than 5 years have passed since last update.

Nginx での 413 Request Entity Too Large エラーの対処法

Posted at

アップロードしようとしたデータサイズが大きいと怒られているので上限値を上げます。

client_max_body_size を下記のように配置します。

nginx.conf
 http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        client_max_body_size 20M;
        listen       80;
        server_name  localhost;

        # Main location
        location / {
            proxy_pass         http://127.0.0.1:8000/;
        }
    }
}

配置後reloadします。

service nginx reload
167
137
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
167
137