Re: Nginx not respecting locations execution ordering

2018-04-18 Thread c0nw0nk
Igor Sysoev Wrote: --- > > On 18 Apr 2018, at 01:35, c0nw0nk > wrote: > > > > Thank you for the help :) > > > > A new dilemma has occurred from this. > > > > I add a location like so. > > > > location ^~/media/files/ { > > add_header X-Locati

Re: Nginx not respecting locations execution ordering

2018-04-18 Thread Igor Sysoev
> On 18 Apr 2018, at 01:35, c0nw0nk wrote: > > Thank you for the help :) > > A new dilemma has occurred from this. > > I add a location like so. > > location ^~/media/files/ { > add_header X-Location-Order First; > } > location ~ \.mp4$ { > add_header X-Location-MP4 Served-from-MP4-location; >

Re: RE: Nginx not respecting locations execution ordering

2018-04-17 Thread c0nw0nk
Thank you for the help :) A new dilemma has occurred from this. I add a location like so. location ^~/media/files/ { add_header X-Location-Order First; } location ~ \.mp4$ { add_header X-Location-MP4 Served-from-MP4-location; } location ~* \.(ico|png|jpg|jpeg|gif|flv|mp4|avi|m4v|mov|divx|webm|og

RE: Nginx not respecting locations execution ordering

2018-04-17 Thread Reinis Rozitis
> When I access URL : domain_name_dot_com/media/files/image.jpg > > The Header response is X-Location-Order: Second > > I want it to be using the first location for all URL's that match that not > the regex location can anybody help ? Change the first block to: location ^~/media/files/ { add_h

Nginx not respecting locations execution ordering

2018-04-17 Thread c0nw0nk
So I have a location setup like this. location /media/files/ { add_header X-Location-Order First; } location ~* \.(ico|png|jpg|jpeg|gif|flv|mp4|avi|m4v|mov|divx|webm|ogg|mp3|mpeg|mpg|swf|css|js)$ { add_header X-Location-Order Second; } When I access URL : domain_name_dot_com/media/files/image.jp