title: How to limit max file size for upload in nginx for special location with fastcgi
body: <p>I want to limit max file size for upload to server to 501kb for location /account/personal_info/documents/ and 50k for other URL of my site for security (ddos, etc)
  I made config like text below, but second max_body_size in location /account/personal_info/documents/ does not work at all.
  How should I do that?</p>
  
  <pre><code> location / {
      include fastcgi_params;
      fastcgi_pass unix:/var/run/www/mysite.sock;
      client_max_body_size 50k;
   }
  
   location /account/personal_info/documents/ {
      client_max_body_size 501k;
      fastcgi_pass unix:/var/run/www/mysite.sock;
      fastcgi_param   PATH_INFO /account/personal_info/documents/;
   }
  </code></pre>