No comments at all on this? -SS On 3/31/06 12:21 PM, "Nathan Seven" <scosol@xxxxxxxxxx> wrote: > Hi all- > > Using Apache 2.2.0- > I've read some other threads in the archives reporting weirdness with this- > I am trying to set up a reverse proxy/cache, and have concluded that it > simply does not work. > > The proxy portion works just fine, and the cache portion works just fine for > local files, but mod_cache does not serve-from-cache any proxied content- > > I have tried with various proxied content, and regardless of it's reported > cache-ability I have set the proper mod_cache options to ignore any expires > headers etc, and always cache: > (behavior is broken with both mem_cache and disk_cache) > > This is what all the requests looks like, proxying a request for Opera's > logo: > (the first "fail to connect" is because of ipv6 support- ignore it) > > Mod_cache sees the request: > > [Thu Mar 30 21:36:37 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE > filter for /img/operalogo.gif > [Thu Mar 30 21:36:37 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL > filter for /img/operalogo.gif > > Proxy portion, works just fine: > > [Thu Mar 30 21:36:37 2006] [debug] mod_proxy_http.c(54): proxy: HTTP: > canonicalising URL //www.opera.com/img/operalogo.gif > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(1373): [client > 192.168.1.101] proxy: http: found worker http://www.opera.com/ for > http://www.opera.com/img/operalogo.gif > [Thu Mar 30 21:36:37 2006] [debug] mod_proxy.c(736): Running scheme http > handler (attempt 0) > [Thu Mar 30 21:36:37 2006] [debug] mod_proxy_http.c(1661): proxy: HTTP: > serving URL http://www.opera.com/img/operalogo.gif > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(1754): proxy: HTTP: has > acquired connection for (www.opera.com) > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(1811): proxy: connecting > http://www.opera.com/img/operalogo.gif to www.opera.com:80 > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(1911): proxy: connected > /img/operalogo.gif to www.opera.com:80 > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(2005): proxy: HTTP: fam 28 > socket created to connect to www.opera.com > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(2016): (65)No route to host: > proxy: HTTP: attempt to connect to [2002:42eb:b46b::2]:80 (www.opera.com) > failed > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(2005): proxy: HTTP: fam 2 > socket created to connect to www.opera.com > [Thu Mar 30 21:36:37 2006] [debug] proxy_util.c(2101): proxy: HTTP: > connection complete to [2002:42eb:b46b::2]:80 (www.opera.com) > [Thu Mar 30 21:36:38 2006] [debug] mod_proxy_http.c(1443): proxy: start body > send > > Mod_cache apparently deciding it's cacheable: > > [Thu Mar 30 21:36:38 2006] [debug] mod_cache.c(602): cache: Caching url: > /img/operalogo.gif > [Thu Mar 30 21:36:38 2006] [debug] mod_cache.c(608): cache: Removing > CACHE_REMOVE_URL filter. > [Thu Mar 30 21:36:38 2006] [info] mem_cache: Cached url: > http://_default_:80/img/operalogo.gif? > > Mod_proxy continuing: > > [Thu Mar 30 21:36:38 2006] [debug] mod_proxy_http.c(1530): proxy: end body > send > [Thu Mar 30 21:36:38 2006] [debug] proxy_util.c(1769): proxy: HTTP: has > released connection for (www.opera.com) > > Mod_cache doing something else: > > [Thu Mar 30 21:39:18 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE > filter for /img/operalogo.gif > [Thu Mar 30 21:39:18 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL > filter for /img/operalogo.gif > > Mod_proxy then seems to be serving to client, instead of mod_cache: > > [Thu Mar 30 21:39:18 2006] [debug] mod_proxy_http.c(54): proxy: HTTP: > canonicalising URL //www.opera.com/img/operalogo.gif > [Thu Mar 30 21:39:18 2006] [debug] proxy_util.c(1373): [client > 192.168.1.101] proxy: http: found worker http://www.opera.com/ for > http://www.opera.com/img/operalogo.gif?crap=0 > > So- it looks like mod_cache is caching things as directed, but the decision > to actually serve from cache never happens. > (I have confirmed that the disk cache is caching as well- I can see the > actual objects on disk) > > In contrast, this is what it should look like (serving a cached local file): > > First request: > > [Fri Mar 31 12:12:42 2006] [debug] mod_cache.c(129): Adding CACHE_SAVE > filter for /index.html > [Fri Mar 31 12:12:42 2006] [debug] mod_cache.c(136): Adding CACHE_REMOVE_URL > filter for /index.html > [Fri Mar 31 12:12:42 2006] [debug] mod_cache.c(602): cache: Caching url: > /index.html > [Fri Mar 31 12:12:42 2006] [debug] mod_cache.c(608): cache: Removing > CACHE_REMOVE_URL filter. > [Fri Mar 31 12:12:42 2006] [debug] mod_cache.c(651): cache: Added date > header > [Fri Mar 31 12:12:42 2006] [info] mem_cache: Cached url: > http://192.168.1.10:80/index.html? > > > Reload of page: > > [Fri Mar 31 12:12:59 2006] [info] Incoming request is asking for a uncached > version of /index.html, but we know better and are ignoring it > [Fri Mar 31 12:12:59 2006] [debug] mod_cache.c(261): cache: running > CACHE_OUT filter > [Fri Mar 31 12:12:59 2006] [debug] mod_cache.c(275): cache: serving > /index.html > > So- it appears to me that the CACHE_OUT filter is never being run for some > reason when the proxy is in place- > Has this *ever* worked? > I would be happy to drop back to a working version at this point, but > nowhere on the great interweb can I actually find a report of this working > as it is supposed to. > > -SS > > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx