Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I use Apache 2.2 with mod_proxy to some 3rd party HTTP server.

As it doesn't send any Cache-Control header, I want to add one of 1 day for response code 200, 5 min for 404 and 0 for any other response code.

So I would something like :

SetEnvIf HttpResponseCode "200" rc_200
SetEnvIf HttpResponseCode "404" rc_404

Header set "Cache-Control" "private, max-age=0"
Header set "Cache-Control" "public, max-age=86400" env=rc_404
Header set "Cache-Control" "public, max-age=86400" env=rc_200
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.