Welcome! Log In Create A New Profile

Advanced

Re: Disabling file resuming with X-Accel / Removing headers

Maxim Dounin
March 09, 2012 10:28AM
Hello!

On Thu, Mar 08, 2012 at 01:03:42AM +0100, Adrián Navarro wrote:

> Where should that be?
>
> I have a location for php scripts (all to fastcgi) figuring as internal.
>
> Another one (location /get) which rewrites to the PHP file (therefore
> only accessible via rewrite, as PHP is internal otherwise).
>
> A location /get.php won't work either. I tried using matches inside
> the fcgi directives to add a parameter but didn't work either, in any
> case…

Unless you have anything more specific, this would be "location /".
If you don't have "location /" either (which is not recommended),
this would be implicit location with a settings set on server level.

From what you say I tend to assume you don't have "location /",
and that's why it only works at server level for you.

See docs here for details:

http://nginx.org/en/docs/http/request_processing.html
http://nginx.org/en/docs/http/ngx_http_core_module.html#location

Maxim Dounin

>
> On Wed, Mar 7, 2012 at 6:36 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > Hello!
> >
> > On Wed, Mar 07, 2012 at 06:03:54PM +0100, Adrián Navarro wrote:
> >
> >> max_ranges 0; worked well but only at server directive.
> >>
> >> I have finally decided to use different server{} entries (subdomains)
> >> for the different cases.
> >
> > It should work at location level as well, though please make sure
> > to specify it in location where response is in fact returned, i.e.
> > where your X-Accel-Redirect's are processed.
> >
> > Maxim Dounin
> >
> >>
> >> Thank you
> >>
> >> On Wed, Mar 7, 2012 at 12:45 AM, Adrián Navarro <adrian@navarro.at> wrote:
> >> > Thank you everyone for your answers.
> >> >
> >> > max_ranges 0; works great if set in the main server {} directive.
> >> > Sadly, when put inside a location directive, it will not work. The
> >> > same applies for more_clear_headers.
> >> >
> >> > The other thing I'm seeing is that while headers with max_range for
> >> > the whole directive does return correct headers, chrome still allows
> >> > pausing.
> >> >
> >> > I better get some sleep and keep digging tomorrow.
> >> >
> >> > Thank you, I'll follow up soon.
> >> >
> >> > On Wed, Mar 7, 2012 at 12:24 AM, Francis Daly <francis@daoine.org> wrote:
> >> >> On Tue, Mar 06, 2012 at 11:56:32PM +0100, Adrián Navarro wrote:
> >> >>
> >> >> Hi there,
> >> >>
> >> >>> I am using nginx's X-Accel headers, and I want to disable file
> >> >>> resuming. That implies:
> >> >>> - suppresing output header "Accept-Ranges: bytes"
> >> >>> - suppresing input header "Range"
> >> >>
> >> >>> Anyone have any pointers? I'm running out of ideas now.
> >> >>
> >> >> Completely untested, and not a direct answer to "file resuming", but you
> >> >> asked for pointers, so maybe...
> >> >>
> >> >> If you want a response header from a fastcgi process not to be
> >> >> delivered to the client, see fastcgi_hide_header, for example at
> >> >> http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_hide_header
> >> >>
> >> >> If you want a request header not to be sent to a fastcgi process, set
> >> >> the matching parameter yourself to empty:
> >> >>
> >> >>  fastcgi_param HTTP_RANGE "";
> >> >>
> >> >> Good luck with it,
> >> >>
> >> >>        f
> >> >> --
> >> >> Francis Daly        francis@daoine.org
> >> >>
> >> >> _______________________________________________
> >> >> nginx mailing list
> >> >> nginx@nginx.org
> >> >> http://mailman.nginx.org/mailman/listinfo/nginx
> >> >
> >> >
> >> >
> >> > --
> >> > Adrián Navarro / (+34) 608 831 094
> >>
> >>
> >>
> >> --
> >> Adrián Navarro / (+34) 608 831 094
> >>
> >> _______________________________________________
> >> 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
>
>
>
> --
> Adrián Navarro / (+34) 608 831 094
>
> _______________________________________________
> 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

Disabling file resuming with X-Accel / Removing headers

Adrián Navarro March 06, 2012 05:58PM

Re: Disabling file resuming with X-Accel / Removing headers

Oleksandr V. Typlyns'kyi March 06, 2012 06:14PM

Re: Disabling file resuming with X-Accel / Removing headers

Francis Daly March 06, 2012 06:26PM

Re: Disabling file resuming with X-Accel / Removing headers

Adrián Navarro March 06, 2012 06:46PM

Re: Disabling file resuming with X-Accel / Removing headers

Adrián Navarro March 07, 2012 12:06PM

Re: Disabling file resuming with X-Accel / Removing headers

Maxim Dounin March 07, 2012 12:38PM

Re: Disabling file resuming with X-Accel / Removing headers

Adrián Navarro March 07, 2012 07:06PM

Re: Disabling file resuming with X-Accel / Removing headers

Maxim Dounin March 09, 2012 10:28AM

Re: Disabling file resuming with X-Accel / Removing headers

Adrián Navarro March 09, 2012 05:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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