Caching Authenticated content with mod_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux