Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have frontend apache2 and backend tomcat6 with apache lenya.

Proxy works fine but I want to cache images.

Here is my simple config:

ProxyPass /
ProxyPassReverse /

RewriteRule ^/$ index.html [R]
RewriteRule ^/default/live/(.*)$ $1 [R,L]
RewriteRule ^/(.*)$1 [P]

ProxyRequests Off
RewriteEngine On

and I tried to cache it in this way:

<IfModule mod_disk_cache.c>
CacheEnable disk /
CacheRoot "/var/cache/mod_proxy"
CacheRoot /home/apache2/cache
CacheDefaultExpire      60
CacheMaxExpire          3600

But I got nothing...

I even tried this way:

<IfModule mod_mem_cache.c>
CacheEnable mem /
MCacheMaxObjectSize 1024000
MCacheSize 102400

again without results.

mod_mem_cache and mod_disk_cache enabled. So I don`t know where the problem is... Could you help me, please?

share|improve this question
up vote 0 down vote accepted

For starters: you have a double entry for the CacheRoot.
Check out this page Some Tuning Tips For Apache Mod_Cache (mod_disk_cache) for some deeper information.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.