Apache .conf to disable caching for localhost
<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
This comment has been minimized.
There should be a file at /private/etc/apache2/users/YOUR_USER_NAME.conf to edit