You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Henry <he...@cityweb.co.za> on 2009/08/25 16:09:03 UTC
[users@httpd] mod_disk_cache works for vhost (a), but not (b)
Hi,
I'm pulling my hair out with this one, so hopefully someone could
provide some pointers or suggestions on how to diagnose.
Using httpd: 2.2.8
Problem: mod_disk_cache is working flawlessly for vhost (a), but not
at all for vhost (b). The config for vhost (b) is exactly the same as
(a), except for the domain name, of course.
Server logs for vhost(a) show normal mod_disk_cache activity:
...
mod_disk_cache.c(1051): disk_cache: Body for URL
http://abc.com:80/index.php?l=1 cached.
...
Server logs for vhost(b) shows absolutely no activity for
mod_disk_cache at all.
Config for vhost (a) - which works perfectly:
---------------------------------------------
<VirtualHost *:80>
ServerName abc.com
<FilesMatch '\.(php|css)'>
Header unset Cache-Control
Header unset Last-Modified
Header unset Pragma
Header set Expires "access plus 1 day"
Header set Cache-Control "max-age=86400, public"
</FilesMatch>
<IfModule mod_disk_cache.c>
CacheIgnoreNoLastMod On
CacheStoreNoStore On
CacheStorePrivate On
CacheIgnoreHeaders Set-Cookie
CacheMaxExpire 86400
CacheLastModifiedFactor 10
CacheDefaultExpire 86400
CacheEnable disk /
CacheRoot /var/cache/mod_proxy
CacheDirLevels 5
CacheDirLength 4
</IfModule>
Config for vhost (b) - only difference is Server name:
------------------------------------------------------
...
ServerName abctest.com
...
I have no idea where else to look to even begin to figure out what's going on.
Any suggestions?
Thanks a million.
Regards
Henry
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Henry <he...@cityweb.co.za>.
Quoting "Krist van Besien" <kr...@gmail.com>:
> Which is also as expected. Apache does not cache pages that are
> authenticated. As you can read here:
> http://httpd.apache.org/docs/2.2/mod/mod_cache.html
> "content with access protection is not cached".
Ah, thanks Krist. My fault for not reading the *entire* page...
Cheers
Henry
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Krist van Besien <kr...@gmail.com>.
On Wed, Aug 26, 2009 at 7:56 AM, Henry<he...@cityweb.co.za> wrote:
> Quoting "Krist van Besien" <kr...@gmail.com>:
>>
>> No access control on your test site?
>
> Yes, the test site has a .htaccess file limiting access. This works as
> expected.
I suspected that.
> I can browse to the test site just fine - it's just not being cached.
Which is also as expected. Apache does not cache pages that are
authenticated. As you can read here:
http://httpd.apache.org/docs/2.2/mod/mod_cache.html
"content with access protection is not cached".
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Henry <he...@cityweb.co.za>.
Quoting "Krist van Besien" <kr...@gmail.com>:
> No access control on your test site?
Yes, the test site has a .htaccess file limiting access. This works
as expected.
I can browse to the test site just fine - it's just not being cached.
h
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Krist van Besien <kr...@gmail.com>.
On Tue, Aug 25, 2009 at 4:56 PM, Henry<he...@cityweb.co.za> wrote:
> Quoting "Krist van Besien" <kr...@gmail.com>:
>>
>> Do both hosts serve the same content? If both are identical, why not
>> just define vhost b as a serveralias in vhost a?
>
> Thanks for the quick feedback -
>
> abctest.com is a test environment for live abc.com, so they're actually
> separate sites.
No access control on your test site?
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Henry <he...@cityweb.co.za>.
Quoting "Krist van Besien" <kr...@gmail.com>:
> Do both hosts serve the same content? If both are identical, why not
> just define vhost b as a serveralias in vhost a?
Thanks for the quick feedback -
abctest.com is a test environment for live abc.com, so they're
actually separate sites.
Re: [users@httpd] mod_disk_cache works for vhost (a), but not (b)
Posted by Krist van Besien <kr...@gmail.com>.
On Tue, Aug 25, 2009 at 4:09 PM, Henry<he...@cityweb.co.za> wrote:
> Hi,
>
> I'm pulling my hair out with this one, so hopefully someone could provide
> some pointers or suggestions on how to diagnose.
>
> Using httpd: 2.2.8
>
> Problem: mod_disk_cache is working flawlessly for vhost (a), but not at all
> for vhost (b). The config for vhost (b) is exactly the same as (a), except
> for the domain name, of course.
Do both hosts serve the same content? If both are identical, why not
just define vhost b as a serveralias in vhost a?
Krist
--
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
---------------------------------------------------------------------
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