ajay Wrote:
---
> you can use http://nginx.org/en/docs/http/ngx_http_map_module.html
>
> Ex:
>
> map $http_user_agent $mobile {
> ~* msn-bot 'http://devnull';
>
> default 'http://productionrupal';
>
> }
Actually that worked perfect
Maxim Dounin Wrote:
---
> Hello!
>
> On Fri, Feb 21, 2014 at 10:25:58AM -0500, rge3 wrote:
>
> > I havne't found any ideas for this and thought I might ask here. We
> have a
> > fairly straightforward pro
I havne't found any ideas for this and thought I might ask here. We have a
fairly straightforward proxy_cache setup with a proxy_pass backend. We
cache documents for different lengths of time or go the backend for what's
missing. My problem is we're getting overrun with bot and spider requests.
Maxim Dounin Wrote:
> The "proxy_cache_valid" directives are used if there are no
> Cache-Control/Expires to allow caching (or they are ignored with
> proxy_ignore_headers). That is, with "proxy_cache_valid" you can
> cache something which isn't normally cached, but they don't
> prevent cachi
Maxim Dounin Wrote:
---
> An exiting cache can be bypassed due to proxy_cache_bypass in your
> config, and 503 response can be cached if it contains
> Cache-Control and/or Expires which allow caching.
Oh, I hadn't thought of that part about t
Hi,
I'm trying to use the proxy cache to store regular pages (200) from my web
server so that when the web server goes into maintenance mode and starts
returning 503 nginx can still serve the good page out of cache. It works
great for a few minutes but then at some point (5 to 10 minutes in) ngin