httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Rabben" <>
Subject [users@httpd] Caching Authenticated content with mod_cache
Date Wed, 20 Dec 2006 14:05:26 GMT
I have set up Apache HTTP Server 2.2.3 with mod_proxy, mod_proxy_ajp and
mod_cache as a reverse proxy in front of a Tomcat 5.5 server. The
solution works fine except that I am having trouble getting Apache to
cache content from a directory that is protected using Basic

Both servers are running on Windows XP.

>From the Apache documentation I have read that Apache won't cache
Authenticated content:

"If the request contains an "Authorization:" header, the response will
not be cached."

Is there any way to force Apache HTTP Server to cache responses from
Tomcat protected with Basic Authentication? 

I have tried using the Cache-Control header with the "public" option
with no luck.

My settings from httpd.conf:

LoadModule proxy_module modules/
LoadModule proxy_ajp_module modules/

<Location /MyFolder>
  ProxyPass ajp://appsrv:8009/MyApp
  ProxyPassReverse ajp://appsrv:8009/MyApp

LoadModule cache_module modules/

<IfModule mod_cache.c>
  LoadModule disk_cache_module modules/
  <IfModule mod_disk_cache.c>
    CacheRoot c:/cacheroot/
    CacheEnable disk /MyFolder/data/
    CacheEnable disk /MyFolder/images/
    CacheEnable disk /MyFolder/js/
    CacheEnable disk /MyFolder/css/
    CacheEnable disk /MyFolder/secure/
    CacheDirLevels 5
    CacheDirLength 3


Roland Rabben
Scala Inc.

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