This is a discussion on Apache 2.2 cache proxy within the Apache Web Server forums, part of the Web Server and Related Forums category; Hello, I need to know if apache 2.2 is able to cache any content that would be returned from ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I need to know if apache 2.2 is able to cache any content that would be returned from an upstream server (aka Zope in this case). I know how to do that with a squid server but I have to find a solution with apache only. I need to configure apache to force a cache of any content without Zope rendrering cache control headers. Here's what I started but I can't see any file in my cache directory and total number of request per second is stable, so I think my configuration is false but I can not find where. LoadModule cache_module modules/mod_cache.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from all # For test only </Proxy> ProxyVia On CacheEnable disk / CacheRoot "/var/cache/mod_proxy" CacheDirLevels 5 CacheDirLength 3 CacheDefaultExpire 60 <VirtualHost *:80> ServerName www.monsite.com DocumentRoot /home/zope/data/www RewriteEngine on RewriteCond %{REQUEST_URI} !^/files(.*) RewriteCond %{REQUEST_URI} !^/common(.*) RewriteCond %{REQUEST_URI} !^/design(.*) RewriteCond %{REQUEST_URI} !^/robots.txt RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1 [L,P] </VirtualHost> Any idea ? Regards, Laurent |
|
|||
|
For anybody trying to fix this problem, here is the solution:
Add this directive to your configuration: CacheIgnoreNoLastMod On Regards, Laurent asrenzo a écrit : > Hello, > > I need to know if apache 2.2 is able to cache any content that would be > returned from an upstream server (aka Zope in this case). I know how to > do that with a squid server but I have to find a solution with apache > only. I need to configure apache to force a cache of any content without > Zope rendrering cache control headers. > > Here's what I started but I can't see any file in my cache directory and > total number of request per second is stable, so I think my > configuration is false but I can not find where. > > LoadModule cache_module modules/mod_cache.so > LoadModule disk_cache_module modules/mod_disk_cache.so > LoadModule file_cache_module modules/mod_file_cache.so > LoadModule mem_cache_module modules/mod_mem_cache.so > > ProxyRequests On > > <Proxy *> > Order deny,allow > Deny from all > Allow from all # For test only > </Proxy> > > ProxyVia On > > CacheEnable disk / > CacheRoot "/var/cache/mod_proxy" > CacheDirLevels 5 > CacheDirLength 3 > CacheDefaultExpire 60 > > <VirtualHost *:80> > ServerName www.monsite.com > DocumentRoot /home/zope/data/www > > RewriteEngine on > > RewriteCond %{REQUEST_URI} !^/files(.*) > RewriteCond %{REQUEST_URI} !^/common(.*) > RewriteCond %{REQUEST_URI} !^/design(.*) > RewriteCond %{REQUEST_URI} !^/robots.txt > RewriteRule ^/(.*) > http://127.0.0.1:8080/VirtualHostBase/http/%{HTTP_HOST}:%{SERVER_PORT}/Examples/VirtualHostRoot/$1 > [L,P] > </VirtualHost> > > Any idea ? > > Regards, > > Laurent |
| Thread Tools | |
| Display Modes | |
|
|