Welcome! Log In Create A New Profile

Advanced

Re: Problems getting NginX to cache

Maxim Dounin
March 27, 2010 08:38PM
Hello!

On Sat, Mar 27, 2010 at 12:40:28PM +0000, Mike wrote:

> I've been trying to setup NginX as a frontend cache for a webserver.
> This is rather challenging, as the documentation is a little flakey but
> it does look like it should be fairly straight forward. The reverse
> proxing is working just fine, it just doesn't cache anything. This is
> on version nginx version: nginx/0.7.65

[...]

> The following to server {}:
>
> proxy_buffering on;
> proxy_store on;
> proxy_store_access user:rw group:rw all:r;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header Host $host;
>
> And the following to location {}:
>
> proxy_cache my-cache;
> proxy_cache_valid 200;

[...]

Directives proxy_store and proxy_cache can't be used at the same
time, while in your config proxy_store is inherited from server
level - so effectively you have both of them switched on in the
location.

It's the bug that nginx doesn't reject such configuration as
invalid.

Adding "proxy_store off;" to your location with proxy_cache (or
just removing it from server block) will resolve your problem.

Maxim Dounin

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

Problems getting NginX to cache

Mike March 27, 2010 08:44AM

Re: Problems getting NginX to cache [SOLVED]

Mike March 27, 2010 08:06PM

Re: Problems getting NginX to cache

Maxim Dounin March 27, 2010 08:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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