[Techtalk] caching and apache2

Almut Behrens almut-behrens at gmx.net
Wed Jul 12 17:55:25 UTC 2006

On Wed, Jul 12, 2006 at 02:10:33PM +0100, Caroline Johnston wrote:
> Hi,
> How do I get apache2 to add a no-store header to files served from a
> particular directory? I'm sure this is answered on a billion tutorials
> somewhere but apparently my google skills are a bit rusty today...


there are several ways to do this, but typically you'd use mod_headers [1].
Make sure the module is loaded, then simply add

Header add Cache-Control "no-store"

to the <directory> section where you want it to appear (or use
"set"/"append" instead of "add" -- see the docs for the difference).

And while you're at httpd.apache.org, also take a quick look at
mod_cache [2], to learn that mod_cache can be told to _not_ honor
the "no-store" directive (i.e. CacheStoreNoStore), etc. (might be
irrelevant, though, depending on what you want to achieve...)


[1] http://httpd.apache.org/docs/2.0/mod/mod_headers.html
[2] http://httpd.apache.org/docs/2.0/mod/mod_cache.html

More information about the Techtalk mailing list