httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [users@httpd] Apache reverse and caching proxy
Date Thu, 12 Jan 2006 14:27:15 GMT
Hello Axel-St├ęphane,

If I can follow what you are trying to tell me, I should add the 
"expiresactive on" directive on the source server instead of the caching 

Axel-St├ęphane  SMORGRAV <> 
12/01/2006 15:12
Please respond to


RE: [users@httpd] Apache reverse and caching proxy

The mod_expires that you activate with "ExpiresActive On" will add an 
Expires header to the responses sent to the client. It does nothing for 
Apache cache expiration. It does however have an effect on the expiration 
of downstream caches, in your case probably on the User Agent cache.

For cache expiration you should use the CacheDefaultExpire directive.  I 
believe mod_cache will make a conditional request for the resource when 
the cache entry gets stale. 

If you set CacheDefaultExpires to a low value, mod_cache will frequently 
try to refresh the cache. 

CacheDefaultExpires affects only responses that do not contain an explicit 
expiry date.

From: [] 
Sent: Thursday, January 12, 2006 3:02 PM
Subject: [users@httpd] Apache reverse and caching proxy

Hello all, 

I'm retrying my configuration for a caching proxy server which flushes the 
cache on the modification time of the files. However, It doesn't seem to 
work anymore. The files get cached but are not refreshed on a touch of the 
file on the source server. 

Not sure what I changed that it doesn't work anymore. As far as I'm 
concerned, I do nothing more then setup an apache server to serve static 
files from disk in an ordinary manner. Next I put a proxy server in front. 
The configuration of the proxy can be found at the end. 

When inspecting the debug logs and the http headers, all files get cached 
at the proxy. However when I change the modification time of the files on 
the source servers, the cache doesn't get updated. Thus still serving the 
old version of the file. 

As a matter a fact, once a file is cached, the source server is never 
accessed anymore to verify the correctness of the cache against the remote 

Does anybody have a clue about which sublety I'm missing here? 

Thanks beforehand! 
Wim Van Leuven 


ExpiresActive On 
ExpiresDefault "modification" 
ProxyRequests Off 

<Proxy *> 
    Order deny,allow 
    Allow from all 

ProxyPass / http://srcsvr.ldc.local/ 
ProxyPassReverse / http://srcsvr.ldc.local/ 

# Cache configuration 
<IfModule mod_cache.c> 
    LoadModule disk_cache_module modules/ 
    <IfModule mod_disk_cache.c> 
            CacheRoot "C:/Program Files/Apache Group/Apache2/cache" 
            CacheSize 256 
            CacheEnable disk / 
            CacheDirLevels 5 
            CacheDirLength 3 
            CacheIgnoreCacheControl Off 
    #LoadModule mem_cache_module modules/ 
    <IfModule mod_mem_cache.c> 
        CacheEnable mem / 
        MCacheSize 4096 
        MCacheMaxObjectCount 100 
        MCacheMinObjectSize 1 
        MCacheMaxObjectSize 2048 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message