Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache doesn't return headers

Maxim Dounin
March 03, 2011 06:12AM
Hello!

On Thu, Mar 03, 2011 at 05:23:45AM -0500, Alexander Zuban wrote:

> Hello,
>
> We have quite busy phpbb based forum. I found that it is quite heavy
> loaded with bots(Google, AdSense, Yahoo. It seems that AdSense bot
> duplicate every user's request). I have added confuguration to cache all
> dynamic requests and return them to bots only(see config below). But I
> faced strange issue, when page returned from cache - nginx doesn't pass
> any headers back.
>
> So questions are:
> * Are there anything bad that response considered as http 0.9?
> * Is it possible configure it to return headers in case when page was
> returned from cache so response will be considered as 1.1?
> * It seems that cache refreshed evertime when page was hit by user(not
> bot). Is it possible to configure it not to refresh it till it is
> valid(72h in config). To not produce not necessary IO.

[...]

> proxy_cache_bypass $crawlernocache;

You are using proxy_cache_bypass without identical proxy_no_cache,
it's known to have problems (and that's why you see http 0.9
replies). You have to write something like

proxy_cache_bypass $crawlernocache;
proxy_no_cache $crawlernocache;

instead. This way a) http 0.9 problem will be fixed and b) normal
users hits won't touch cache at all.

Maxim Dounin

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

proxy_cache doesn't return headers

Alexander Zuban March 03, 2011 05:23AM

Re: proxy_cache doesn't return headers

Maxim Dounin March 03, 2011 06:12AM

Re: proxy_cache doesn't return headers

Alexander Zuban March 03, 2011 06:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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