Multiple client_max_body_size (location based)

Igor Sysoev is at rambler-co.ru
Tue Jan 13 13:09:53 MSK 2009


On Tue, Jan 13, 2009 at 08:07:02AM -0200, Juan Fco. Giordana wrote:

> Hello,
> 
> Is it possible to have multiple client_max_body_size per location 
> directives?
> 
> I've tried this and doesn't seem to work, but the docs says that it is 
> possible to have client_max_body_size in a location context.
> 
> I'm using nginx-0.6.34.
> 
> server {
>     client_max_body_size 1m;
> 
>     location = upload-image.php {
>         client_max_body_size 3m;
>     }
> 
>     location = upload-file.php {
>         client_max_body_size 10m;
>     }
> }

Yes, it's possible, however, you should correct your locations:

-     location = upload-image.php {
+     location = /upload-image.php {


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list