413 Request Entity Too Large nginx django
<p>I am making a practice web service (client's artbook display web site) The client can upload artbook images to the server.</p>

<p>But I get the following error when the client uploads too many images</p>

<pre><code>413 Request Entity Too Large
</code></pre>

<p>I tried adding <code>client_max_body_size 100M;</code> in nginx.conf</p>

<pre><code>#user  nobody;
#Defines which Linux system user will own and run the Nginx server

worker_processes  1;

#error_log  logs/error.log; #error_log  logs/error.log  notice;
#Specifies the file where server logs.

#pid        logs/nginx.pid;
#nginx will write its master process ID(PID).

events {
    worker_connections  1024;
}


http {
    include       mime.types;

    default_type  application/octet-stream;

    #access_log  logs/access.log  main;

    sendfile        on;

    server {
        listen       80;

        server_name  xxxx.net;
        client_max_body_size 100M;
        keepalive_timeout 5;

        return 301 https://$server_name$request_uri;

    }

    # HTTPS server
    #
    server {
        listen       443 default_server ssl;
        server_name  xxx.net;

        ssl_certificate      /etc/letsencrypt/live/xxxx.net/fullchain.pem;
        ssl_certificate_key  /etc/letsencrypt/live/xxxx.net/privkey.pem;

        ssl_session_cache    shared:SSL:1m;
        ssl_session_timeout  5m;


        location / {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header HOST $http_host;
            proxy_set_header X-NginX-Proxy true;

            proxy_pass http://127.0.0.1:8000;
            proxy_redirect off;
        }
    }
}
</code></pre>

<p>and tried:</p>

<pre><code>sudo service nginx restart
sudo service nginx reload
</code></pre>

<p>and retry</p>

<pre><code>runserver 
</code></pre>

<p>but still get</p>

<pre><code>413 Request Entity Too Large
</code></pre>

<p>Can anybody help?</p>