我有前面apache2和后端tomcat6与apache lenya。
代理工作正常,但我想caching图像。
这是我的简单configuration:
ProxyPass / http://192.168.0.82:8888/ ProxyPassReverse / http://192.168.0.82:8888/ RewriteRule ^/$ index.html [R] RewriteRule ^/default/live/(.*)$ $1 [R,L] RewriteRule ^/(.*) http://192.168.0.82:8888/default/live/$1 [P] ProxyRequests Off RewriteEngine On
我试图用这种方式caching它:
<IfModule mod_disk_cache.c> CacheEnable disk / CacheRoot "/var/cache/mod_proxy" CacheRoot /home/apache2/cache CacheDefaultExpire 60 CacheMaxExpire 3600 </IfModule>
但是我什么也没得到
我甚至试过这种方式:
<IfModule mod_mem_cache.c> CacheEnable mem / MCacheMaxObjectSize 1024000 MCacheSize 102400 </IfModule>
再次没有结果。
启用了mod_mem_cache和mod_disk_cache。 所以我不知道问题出在哪里…你能帮我吗?
对于初学者:你有一个CacheRoot的双重入口。
看看这个页面一些调优技巧Apache Mod_Cache(mod_disk_cache)的一些更深入的信息。