Re: reverse proxy configuration help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/26/07, Sam Carleton <scarleton@xxxxxxxxx> wrote:
On 3/26/07, Joshua Slive <joshua@xxxxxxxx> wrote:
> On 3/26/07, Sam Carleton <scarleton@xxxxxxxxx> 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 don't recall off-hand the details of the caching rules, but it seems
like a pretty good bet that the cache is not going to touch something
with Pragma: no-cache and an Expires date in the past. Get rid of
those things.

Joshua.

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux