client_max_body_size for a location {} ? Possible?

Joseph Cabezas tdgh2323 at hotmail.com
Tue Jun 5 19:32:36 UTC 2012


Hello Matt,

Thank you very much.  Is there anyway to match this location ONLY for a specific IP?

        location /wordpress {         
                          client_body_buffer_size 1M;
                              client_max_body_size 2M;
                           proxy_pass http://backend1; 
                         }

In other words I only one IP 1.1.1.1 to be able to use those special buffers for that URL.. everybody else should use the buffers stated at the httpd section.


Regards,
Joseph


> Date: Tue, 5 Jun 2012 22:40:55 +0400
> From: mdounin at mdounin.ru
> To: nginx at nginx.org
> Subject: Re: client_max_body_size for a location  {} ? Possible?
> 
> Hello!
> 
> On Tue, Jun 05, 2012 at 05:31:25PM +0000, Joseph Cabezas wrote:
> 
> > 
> > Answering myself partially
> > 
> >    location /wordpress/wp-admin { client_max_body_size 1m;  }   <-- does that apply for evert sub directory  such as /wordpress/wp-admin/dir1 /wordpress/wp-admin/dir2/app.php etc
> 
> See here for details explanation on how locations work:
> 
> http://nginx.org/r/location
> 
> And here for an answer to your original question:
> 
> http://nginx.org/r/client_max_body_size
> http://nginx.org/r/client_body_buffer_size
> 
> The "context" in the directive description gives a list of places 
> where the directive is allowed.
> 
> Maxim Dounin
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120605/576c309f/attachment-0001.html>


More information about the nginx mailing list