You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ognyan Kulev <og...@tower.3.bg> on 2011/02/17 07:59:17 UTC
[users@httpd] mod_cache and caching .php with query strings
Hi
I'm using Debian's apache 2.2.26 with mod_fcgid for PHP. My CMS Drupal
rewrites all URLs so that they execute main index.php, e.g.
http://localhost/node/1 -> http://localhost/index.php?q=node/1. The
problem is that mod_disk_cache only caches the URL
"http://localhost/index.php?" and as a result all Drupal pages are
served as the first one that hit the cache. I tried explicitly adding
"CacheIgnoreQueryString Off" but this doesn't help.
Is this a bug?
Regards,
Ognyan Kulev
---------------------------------------------------------------------
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_cache and caching .php with query strings
Posted by Igor Galić <i....@brainsware.org>.
> Unfortunately it's not enough for unpatched Drupal because Apache's
> mod_cache violates http://tools.ietf.org/html/rfc2616#section-14.9.3
> by
> looking Expires header before max-age directive and Drupal always
> sets
> Expires:...1978 mentioning this rule.
IIRC, that's fixed in 2.3.. yup:
http://svn.apache.org/viewvc?view=revision&revision=1069942
We might want to propose that for backport..
..unfortunately it doesn't apply cleanly.
> Regards,
> Ognyan Kulev
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
---------------------------------------------------------------------
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_cache and caching .php with query strings
Posted by Ognyan Kulev <og...@tower.3.bg>.
На 17.2.2011 г. 11:11 ч., Igor Galić написа:
>> I'm using Debian's apache 2.2.26 with mod_fcgid for PHP. My CMS
>
> Given that the latest available version is 2.2.17, that would
> surprise me.
2.2.16, yeah :-)
> Is it possible that you do *not* use mod_rewrite?
> And instead use:
>
> FallbackResource?
> http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource
It works for Drupal and now Drupal pages are cached :-) Thank you very
much :-)
Unfortunately it's not enough for unpatched Drupal because Apache's
mod_cache violates http://tools.ietf.org/html/rfc2616#section-14.9.3 by
looking Expires header before max-age directive and Drupal always sets
Expires:...1978 mentioning this rule.
Regards,
Ognyan Kulev
---------------------------------------------------------------------
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_cache and caching .php with query strings
Posted by Igor Galić <i....@brainsware.org>.
----- Original Message -----
> Hi
>
> I'm using Debian's apache 2.2.26 with mod_fcgid for PHP. My CMS
Given that the latest available version is 2.2.17, that would
surprise me.
> Drupal
> rewrites all URLs so that they execute main index.php, e.g.
> http://localhost/node/1 -> http://localhost/index.php?q=node/1. The
> problem is that mod_disk_cache only caches the URL
> "http://localhost/index.php?" and as a result all Drupal pages are
> served as the first one that hit the cache. I tried explicitly adding
> "CacheIgnoreQueryString Off" but this doesn't help.
>
> Is this a bug?
Not really:
http://httpd.apache.org/docs/current/caching.html#overview
"""... mod_cache is a URL mapping module, which means that if a URL
has been cached, and the cached version of that URL has not expired,
the request will be served directly by mod_cache.
This means that any other stages that might ordinarily happen in the
process of serving a request -- for example being handled by mod_proxy,
or mod_rewrite -- won't happen. But then this is the point of caching
content in the first place."""
> Regards,
> Ognyan Kulev
Is it possible that you do *not* use mod_rewrite?
And instead use:
FallbackResource?
http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource
i
--
Igor Galić
Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
---------------------------------------------------------------------
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