Created
August 3, 2012 07:40
-
-
Save JamieMason/3245483 to your computer and use it in GitHub Desktop.
Apache .conf to disable caching for localhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory "/Users/jdog/Sites/"> | |
Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<VirtualHost *:80> | |
ServerName localhost | |
DocumentRoot /Users/jdog/Sites/ | |
# PROXIES | |
# ProxyPass /local/path http://some.com/remote/path | |
# DISABLE ALL CACHING WHILE DEVELOPING | |
<FilesMatch "\.(html|htm|js|css|json)$"> | |
FileETag None | |
<IfModule mod_headers.c> | |
Header unset ETag | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Note "CACHING IS DISABLED ON LOCALHOST" | |
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" | |
</IfModule> | |
</FilesMatch> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There should be a file at /private/etc/apache2/users/YOUR_USER_NAME.conf to edit