Advice on max_ranges for specific location block

sephreph nginx-forum at
Thu Mar 6 21:23:27 UTC 2014

Hi Maxim!

Maxim Dounin Wrote:
> Hello!
> 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
> _______________________________________________
> nginx mailing list
> nginx at

I'm using the XSendFile module too (I stripped that out of my example for
brevity but maybe that was a poor idea).  That's why I was relying on
max_ranges, but I guess I could just check for a range request and return a
416 through the PHP script if one's requested?  I'll have to test to see if
that works, but if it doesn't I'll just duplicate the existing location
block and make it specific to free.php, and add that setting.


Posted at Nginx Forum:,248175,248204#msg-248204

More information about the nginx mailing list