On 3/26/07, Joshua Slive <[EMAIL PROTECTED]> wrote:
On 3/26/07, Sam Carleton <[EMAIL PROTECTED]> wrote:
> I am working on setting up apache as a reverse proxy for a kiosk
> system I am developing.  The basic reverse proxy is working, but it
> does not appear to be caching the requests to the hard drive.

Take a look at the HTTP response headers being sent with the content.
They may be preventing apache from caching.

Joshua,

Here is the response header (got to LOVE firefox):

Date: Mon, 26 Mar 2007 23:18:39 GMT
Server: Apache/2.2.3 (Win32) PHP/5.2.1
X-Powered-By: PHP/5.2.1
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: public, must-revalidate
Pragma: no-cache
Last-Modified: Thu, 05 Jan 2006 14:12:23 GMT
Etag: "e91c6503142404320aa1fc645d6949cd"
Content-Transfer-Encoding: binary
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: image/jpg

200 OK

here are ALL the headers that I am writing out in PHP:

header("Cache-Control: public, must-revalidate");
header("Content-Type: image/jpg");
header("Content-Transfer-Encoding: binary\n");

When looking at the HTTP document about Pragma: no-cache, it looks to
me like it should be ignored.  My whole objective is that I want the
proxy to always *check* to see if the data is out of data, ie use the
Last-Modified and Etag, but if it is not out of date, I want the proxy
to serve up the content from it's cache.

I know each web browser will cache the image, I just want the proxy to
serve up the cached image when a second browser comes along.  At the
same time, the operator can be changing the images real time, such as
rotating them or cropping them, so the proxy always needs to check the
images.

Sam

---------------------------------------------------------------------
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: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to