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
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to