can't get cache controle to set an expire date

Maxim Dounin mdounin at
Fri Sep 16 10:13:53 UTC 2011


On Fri, Sep 16, 2011 at 01:32:10AM -0500, Patrick Aljord wrote:

> Hi,
> This is my nginx config file:
> The problem is that despite setting "expires max" cache sends no
> expire date so I must be doing something wrong.
> This is what appears as header:
> Cache-Control	max-age=0
> Any idea how I could fix this?

Please show request and response.  (And please make sure you 
actually see request in nginx logs, i.e. don't test your browser's 

If request actually hits nginx in question, I see two most likely 

1) Your request is processed in location where you don't have 
"expires max;" set.  I.e. request doesn't match /images/ etc.

2) Your request is processed in another server block.

Maxim Dounin

More information about the nginx mailing list