httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roland Rabben" <roland.rab...@no.scala.com>
Subject [users@httpd] Caching Authenticated content with mod_cache
Date Wed, 20 Dec 2006 14:05:26 GMT
Hi
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
Authentication.

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/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

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

LoadModule cache_module modules/mod_cache.so

<IfModule mod_cache.c>
  LoadModule disk_cache_module modules/mod_disk_cache.so
  
  <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
  </IfModule>
</IfModule>



Regards

Roland Rabben
Scala Inc.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message