Welcome! Log In Create A New Profile

Advanced

Re: Advice on max_ranges for specific location block

Maxim Dounin
March 06, 2014 07:20AM
Hello!

On Thu, Mar 06, 2014 at 06:21:22AM -0500, sephreph wrote:

> Hi,
>
> Hopefully this question isn't too basic, I just want to check if I'm missing
> something obvious.
>
> I'm setting up a basic nginx installation with php-fpm behind it running on
> 127.0.0.1:9000 - that's working fine. I'm using max_ranges set to 5
> globally in the server block (example below), but I have a specific PHP
> script (/free.php) that I want max_ranges set to 0 for. I'm not sure how to
> achieve this.
>
> max_ranges needs to be in a http, server or location block, so would the
> best solution be to copy the "location ~ \.php" block and call it "location
> ~* /free.php" and just add the "max_ranges 0" setting in there? I was
> hoping that location blocks cascade so I could overwrite that setting and
> then the request would fall into the .php block but I don't think that's
> actually the case?

Generally I would recommend adding a "location = /free.php" with
settings specific to a particular script.

On the other hand, in this case there is no real reason to do
anything as nginx won't try to add ranges support for fastcgi
output. It's up to your fastcgi script decide how to to handle
range requests.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Advice on max_ranges for specific location block

sephreph March 06, 2014 06:21AM

Re: Advice on max_ranges for specific location block

Maxim Dounin March 06, 2014 07:20AM

Re: Advice on max_ranges for specific location block

sephreph March 06, 2014 04:23PM

Re: Advice on max_ranges for specific location block

sephreph March 06, 2014 05:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
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