httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Daniels <>
Subject [users@httpd] Apache 2.4: Mod Cache: authorization required
Date Thu, 14 Feb 2013 15:41:57 GMT
Hi all,

I'm trying hard to configure mod_cache with mod_cache_disk and apache 
2.4, without real success.

I'm able to enable cache for public files (no authentication), but not 
for private ones. From my understanding, setting |CacheQuickHandler to 
off |should have done the trick, but it keeps complaining in the logs:

[Thu Feb 14 15:20:18.997941 2013] [cache:debug] [pid 18018:tid 
140317277726464] mod_cache.c(1073): [client xxxxxxxx] AH00768: cache: 
/file/files/test.txt not cached. Reason: Authorization required

Looking around for a solution to this problem, I found also another one: 
cache key is computed before rewrite rule applies, which will lead to 
issues as I'm rewriting the logged use in the url.

My config (part of):

<DirectoryMatch "^/vsite/file/.*$">
AuthType Digest
AuthName "bla"
# To cache credentials, put socache ahead of dbd here
AuthDigestProvider socache dbd
# Also required for caching: tell the cache to cache dbd lookups!
AuthnCacheProvideFor dbd
AuthnCacheContext blabla

Require valid-user
AuthDBDUserRealmQuery "SELECT digestpwd FROM user WHERE name= %s"

RewriteCond %{LA-U:REMOTE_USER} ([0-9]+)
RewriteRule ^/file/(.*) /data/%1/$1 [L]

<IfModule mod_cache.c>
<IfModule mod_cache_disk.c>
LogLevel cache:trace8
CacheQuickHandler off
CacheRoot /tmp/apachecache
CacheEnable disk /
CacheDefaultExpire 120
CacheIgnoreURLSessionIdentifiers jsessionid JSESSIONID

Any way to get around those problems ?

Thanks a lot for your help !

Nicolas Daniels
Blue Pimento Service s.p.r.l.
Rue Louis de Geer 6
B-1348 Louvain-la-neuve
☎+32 10 390 014
☎+32 498 089 725
Fax. +32 10 390 001

Visit our web site: <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message