You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oliver Feiler <ol...@repro-mayr.de> on 2009/11/11 10:20:31 UTC
[users@httpd] mod_disk_cache - directive CacheRoot ignored in context "server config" but not inside a virtual host
Hi,
I have an issue with Apache's mod_disk_cache and the config directive CacheRoot. The versions used are as follows. It's a default Debian 5 Apache with mpm-worker used as a reverse proxy.
# apache2ctl -V
Server version: Apache/2.2.9 (Debian)
Server built: Jul 14 2009 20:40:18
Server's Module Magic Number: 20051115:15
Server loaded: APR 1.2.12, APR-Util 1.2.12
Compiled using: APR 1.2.12, APR-Util 1.2.12
Architecture: 64-bit
Server MPM: Worker
threaded: yes (fixed thread count)
forked: yes (variable process count)
The CacheRoot is defined via an include (Debian's default config layout) and mapped into the main config.
CacheRoot /var/cache/apache2/mod_disk_cache
My guess (as per documentation) is that this defines the default CacheRoot to be used by all configured proxy virtual hosts. If I now define a virtual host like the following:
<VirtualHost something:80>
[...]
ProxyVia On
ProxyPreserveHost On
ProxyPass / balancer://something/
<Proxy balancer://something/>
BalancerMember http://backend1
BalancerMember http://backend2
</Proxy>
CacheMaxFileSize 8000000
CacheEnable disk /
</VirtualHost>
The proxy now works as expected, but nothing will be cached in the disk cache. There are no age headers generated by the proxy on served requests. Now if I add the directive
CacheRoot /var/cache/apache2/mod_disk_cache
to this virtual host, the disk cache fills and age headers are sent as expected.
I feel like I'm missing something or made a really stupid mistake with the config. It works if I repeat the CacheRoot statement for all virtual hosts, but I'd rather define it globally since there are quite a number of virtual hosts.
Thanks and kind regards,
Oliver Feiler
---------------------------------------------------------------------
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