Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache seems not working with X-Accel-Redirect

Maxim Dounin
January 11, 2017 09:34AM
Hello!

On Wed, Jan 11, 2017 at 07:39:32AM -0500, bdesemb wrote:

> Hi Maxim,
>
> Can you post an example please? I don't understand how to do that.

Try something like this:

server {
server 8080;

location / {
# no caching configured, only proxying to an intermediate
# caching layer; X-Accel-Redirect is processed here

proxy_pass http://127.0.0.1:8081;
}
}

server {
server 8081;

location / {
# here caching happens; to cache X-Accel-Redirect
# responses, the header is ignored

proxy_pass http://real-upstream-server;
proxy_cache foo;
proxy_ignore_headers X-Accel-Redirect;
}
}

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

proxy_cache seems not working with X-Accel-Redirect

gray August 09, 2013 06:20AM

Re: proxy_cache seems not working with X-Accel-Redirect

Maxim Dounin August 16, 2013 10:34PM

Re: proxy_cache seems not working with X-Accel-Redirect

bdesemb January 11, 2017 07:39AM

Re: proxy_cache seems not working with X-Accel-Redirect

Maxim Dounin January 11, 2017 09:34AM

Re: proxy_cache seems not working with X-Accel-Redirect

bdesemb January 11, 2017 11:10AM

Re: proxy_cache seems not working with X-Accel-Redirect

bdesemb January 11, 2017 12:23PM

Re: proxy_cache seems not working with X-Accel-Redirect

Maxim Dounin January 11, 2017 12:44PM

Re: proxy_cache seems not working with X-Accel-Redirect

bdesemb January 12, 2017 07:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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