You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by wi...@lxcenter.org on 2012/04/17 14:51:11 UTC
[users@httpd] mod_disk_cache and php
httpd 2.2.22
I have the frontend set up to serve static content and to be a reverse
proxy to the backend to handle php requests. The front end is set
with mod_disk_cache as well. With the proper header, it caches php
files just fine. The problem is that it saves it with a question mark
at the end (?). For example in the debug logs I see the saving of
test.php as test.php?. So when I request the page again, it doesn't
retrieve the cache. If I make the request as
http://www.example.com/test.php? it works fine. Of course if I do
this in IE directly, it removes the ? from it, so I use Fiddler2 and
send the request through it to ensure it sends. And the logs indicate
that it pulls it from cache. Using something like test.php?a=1 also
works just fine. It doesn't append the question mark when saving it,
and it recalls the cache just fine.
CacheRoot /home/httpd/example.com/disk_cache/
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
ProxyPassReverse / http://127.0.0.1:8080/
ProxyPassMatch ^/(.*\.php)$ http://127.0.0.1:8080/$1
Any ideas why this would occur?
Thanks,
Will
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_disk_cache and php
Posted by wi...@lxcenter.org.
I was able to get this working by switching the caching to the backend
and then just switching it to the front end with clearing the cache
and restarting the services in between. I had done this before and
have even done this from fresh installs to no avail. Well it works
now anyway.
-Will
Quoting william.leonard@lxcenter.org:
> httpd 2.2.22
>
> I have the frontend set up to serve static content and to be a
> reverse proxy to the backend to handle php requests. The front end
> is set with mod_disk_cache as well. With the proper header, it
> caches php files just fine. The problem is that it saves it with a
> question mark at the end (?). For example in the debug logs I see
> the saving of test.php as test.php?. So when I request the page
> again, it doesn't retrieve the cache. If I make the request as
> http://www.example.com/test.php? it works fine. Of course if I do
> this in IE directly, it removes the ? from it, so I use Fiddler2 and
> send the request through it to ensure it sends. And the logs
> indicate that it pulls it from cache. Using something like
> test.php?a=1 also works just fine. It doesn't append the question
> mark when saving it, and it recalls the cache just fine.
>
> CacheRoot /home/httpd/example.com/disk_cache/
> CacheEnable disk /
> CacheDirLevels 5
> CacheDirLength 3
> ProxyPassReverse / http://127.0.0.1:8080/
> ProxyPassMatch ^/(.*\.php)$ http://127.0.0.1:8080/$1
>
> Any ideas why this would occur?
>
> Thanks,
> Will
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] mod_disk_cache and php
Posted by Will <wi...@lxcenter.org>.
Notice here as well that this person seemed to have the same problem and his
logs also indicate that a ? was appended for the storing of the cache:
http://apache-http-server.18135.n6.nabble.com/users-httpd-Cached-responses-in-mod-cache-mod-mem-cache-not-always-sent-td4739031.html
-Will
----- Original Message -----
From: <wi...@lxcenter.org>
To: <us...@httpd.apache.org>
Sent: Tuesday, April 17, 2012 8:51 AM
Subject: [users@httpd] mod_disk_cache and php
> httpd 2.2.22
>
> I have the frontend set up to serve static content and to be a reverse
> proxy to the backend to handle php requests. The front end is set with
> mod_disk_cache as well. With the proper header, it caches php files just
> fine. The problem is that it saves it with a question mark at the end
> (?). For example in the debug logs I see the saving of test.php as
> test.php?. So when I request the page again, it doesn't retrieve the
> cache. If I make the request as http://www.example.com/test.php? it
> works fine. Of course if I do this in IE directly, it removes the ? from
> it, so I use Fiddler2 and send the request through it to ensure it sends.
> And the logs indicate that it pulls it from cache. Using something like
> test.php?a=1 also works just fine. It doesn't append the question mark
> when saving it, and it recalls the cache just fine.
>
> CacheRoot /home/httpd/example.com/disk_cache/
> CacheEnable disk /
> CacheDirLevels 5
> CacheDirLength 3
> ProxyPassReverse / http://127.0.0.1:8080/
> ProxyPassMatch ^/(.*\.php)$ http://127.0.0.1:8080/$1
>
> Any ideas why this would occur?
>
> Thanks,
> Will
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org