我想用mod_cache设置apache + mod_jk / mod_proxy。
但它看起来像所有代理请求被mod_cache忽略。 可能与模块处理顺序有关系吗? Apache 2.2.22
我已经尝试使用mod_jk和mod_proxy – 没有任何帮助。 LogLevel设置为debugging。
VirtualHost(https):
ProxyPass /app/ https://server:8443/app/ ProxyPassReverse /app/ https://server:8433/app/ CacheEnable mem / #tried JkMount / loadbalancer #tried Also disk #CacheDefaultExpire 3600 #CacheEnable disk / #CacheDirLevels 2 #CacheDirLength 1 #CacheMaxFileSize 3000000 #CacheMinFileSize 1 #CacheIgnoreCacheControl On #CacheIgnoreNoLastMod On #CacheIgnoreQueryString On #CacheIgnoreHeaders Set-Cookie #CacheLastModifiedFactor 0.1 #CacheMaxExpire 86400 #CacheStoreNoStore On #CacheStorePrivate On
如果我请求一些非代理资源(server / test.png),我可以在日志或磁盘存储中成功查看资源已被caching。
这对我来说很奇怪,因为我在文档和Google上看到人们成功地使用了mod_cache和proxy。
看起来像它实际上工作,但只为mem_cache。 磁盘caching忽略代理内容。
此外,如果请求没有caching或最大年龄0内容不会被caching,并立即从后端请求。