Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

mod_disk_cache - directive CacheRoot ignored in context "server config" but not inside a virtual host

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


oliver.feiler at repro-mayr

Nov 11, 2009, 1:20 AM

Post #1 of 1 (249 views)
Permalink
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.