> ## Content Index
> Fetch the complete content index at: https://kudithipudi.org/llms.txt
> Use this file to discover other available public pages before exploring further.

# HOW TO : Configure Cache Expiration in Apache
- URL: https://kudithipudi.org/how-to-configure-cache-expiration-in-apache/
- Published: 2011-02-01T02:43:21.000Z
- Updated: 2011-02-01T02:43:21.000Z
- Description: Cache servers depend on cache control headers provided by the web server. Essentially, the web server (based on the configuration) specify’s what content is cache-able and for how...
- Author: admin
- Tags: HOWTO, Technology, Uncategorized, Web, #wp, #wp-post, #Import 2026-08-23 02:32

[Cache servers](http://en.wikipedia.org/wiki/Cache?ref=kudithipudi.org#Web%5Fcache) depend on cache control headers provided by the web server. Essentially, the web server (based on the configuration) specify’s what content is cache-able and for how long. (Note: Some of the cache servers might ignore this and have a default cache period for specific content. But that is not for another post 🙂 )

Here is a quick and dirty way to configure [Apache 2.x](http://httpd.apache.org/?ref=kudithipudi.org) server to enable [cache control](https://kudithipudi.org/content/files/httpd-apache-org/docs/2-0/mod/mod%5Fexpires.xml) settings on all content in a directory

\[bash\]  
ExpiresActive On  
<Directory "/var/www/html/static">  
Options FollowSymLinks MultiViews  
Order allow,deny  
Allow from all  
ExpiresDefault "modification plus 1 hour"  
</Directory>  
\[/bash\]

This configuration tells apache to enable cache headers for all content in the /var/www/html/static folder. The cache expiration is set to expire 1 hour from the modification time of the content.