Welcome! Log In Create A New Profile

Advanced

Re: Limit serving to responses only below certain size

Bob S.
March 06, 2013 03:08PM
Are you saying that you do not have administrative control of your system?

Jonathan is right - set policies that disallow large file sizes and enforce
them.

If necessary use chron to check for large files and remove them.


On Wed, Mar 6, 2013 at 2:28 PM, Calin Don <calin.don@gmail.com> wrote:

> Unfortunately the way big files are getting there is beyond my control.
>
>
> On Wed, Mar 6, 2013 at 5:30 PM, Jonathan Matthews <contact@jpluscplusm.com
> > wrote:
>
>> On 6 March 2013 13:28, Calin Don <calin.don@gmail.com> wrote:
>> > Hi,
>> >
>> > Is there a way to server files only below a certain size?
>> > eg. Return 403 on files bigger than 5MB?
>>
>> Assuming you're talking about local filesystem files, you might try to
>> proxy_pass back round to yourself, and do an if() based on
>> $upstream_http_content_length.
>>
>> If you're already proxy'ing, you could use the same technique but
>> without the double nginx hit.
>>
>> I'd personally look at /how/ too-large files are getting onto disk,
>> and fix that, however.
>>
>> Jonathan
>> --
>> Jonathan Matthews // Oxford, London, UK
>> http://www.jpluscplusm.com/contact.html
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>>
>
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Limit serving to responses only below certain size

Calin Don March 06, 2013 08:30AM

Re: Limit serving to responses only below certain size

Jonathan Matthews March 06, 2013 10:32AM

Re: Limit serving to responses only below certain size

Calin Don March 06, 2013 02:30PM

Re: Limit serving to responses only below certain size

Bob S. March 06, 2013 03:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 179
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready