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 perfectly! Then I can do it entirely without the 'if'. Thanksby rge3 - Nginx Mailing List - English
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 proxy_cache setup with a proxy_pass backend. > We > > cache documents for different lengths of tiby rge3 - Nginx Mailing List - English
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. MSN in particular started hitting us exceptionally hard yesterday and started bringing our backend sby rge3 - Nginx Mailing List - English
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 caching of other responses. That was my missing piece. Thanksby rge3 - Nginx Mailing List - English
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 the bypass. Okay, that makes sense. But what about the Cache-Control/Expires causingby rge3 - Nginx Mailing List - English
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) nginx will overwrite the good 200 page in the cache with the bad 503 page and then start handing out thby rge3 - Nginx Mailing List - English