RE: [squid-users] Can't get apache to set Expire headers

From: Anuradha Hegde <anuradha@dont-contact.us>
Date: Thu, 01 Aug 2002 07:16:53 -0700

Since you are using Servlet to build your page you can set response headers
in the Servlet code.
Use HttpServletResponse.setDateHeader("Expires", expirationDate);
    HttpServletResponse.setHeader("Cache-Control", "max-age="+setTheAge);

Hope this helps..

Anuradha

-----Original Message-----
From: Luiz Gustavo [mailto:gustavo@shoptime.com]
Sent: Wednesday, July 31, 2002 6:12 PM
To: squid-users@squid-cache.org
Subject: Re: [squid-users] Can't get apache to set Expire headers

On Wed, Jul 31, 2002 at 04:29:01PM -0400, Emilia Sherifova wrote:

> I would like to set up squid in an accelerator mode. I set it up alright
> but it would not cache any of the files. When I looked closer at the
files,
> I realized that the expire headers are not set. I made sure to install
> mod_expires in apache (when I do httpd -l, I can see mod_expires.c as
> installed).

 Works for me just using last modified. You can use your own pages to
 set expiration instead of stick with mod_expires.

> Yet, no expire header gets set. Here is what I get when I telnet to the
> website and request an image file:
>
> GET /images/logo.gif HTTP/1.1
>
> HTTP/1.0 200 OK
> Date: Wed, 31 Jul 2002 19:35:12 GMT
> Server: Apache/1.3.20 (Unix) ServletExecAS/3.1
> Content-Type: image/gif
> Content-Length: 2577
> X-Cache: MISS from eqsdev
> Connection: keep-alive

 Show what squid logs tell to you.

> I was wondering maybe it is because we use servlet engine and war files to
> deploy the web application? Or is there anything I'm doing wrong. Any
> pointers would be greatly appreaciated.

 What are you using as application server? Your static data are begin
 served by apache itself or by your app server?

--
gustavo
Received on Thu Aug 01 2002 - 08:12:07 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:30 MST