Skip to content

Instantly share code, notes, and snippets.

@Jany-M Jany-M/expires.conf
Last active Jan 27, 2020

Embed
What would you like to do?
[Apache] mod_expires conf
# etc/httpd/conf.d/expires.conf
# https://support.plesk.com/hc/en-us/articles/115001711985-How-to-enable-leverage-browser-caching-in-Plesk
# https://support.plesk.com/hc/en-us/articles/213380049-How-to-enable-gzip-compression-on-nginx-on-Plesk-server
LoadModule expires_module modules/mod_expires.so
ExpiresActive on
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType application/x-font-ttf "access plus 1 year"
ExpiresByType application/x-font-opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/x-ico "access plus 1 year"
ExpiresByType text/plain "access plus 3 month"
ExpiresByType text/css "access 1 week"
ExpiresByType text/javascript "access 1 week"
ExpiresByType text/html "access 1 week"
ExpiresByType text/xml "access plus 3 month"
ExpiresByType application/javascript "access 1 week"
ExpiresByType application/x-javascript "access 1 week"
ExpiresByType application/xhtml-xml "access 3 month"
ExpiresByType application/pdf "access plus 3 month"
ExpiresByType application/xml "access plus 3 month"
ExpiresByType application/rss+xml "access 1 week"
ExpiresByType application/json "access plus 1 seconds"
ExpiresByType application/x-shockwave-flash "access 3 month"
ExpiresByType image/jpe "access plus 1 year"
ExpiresByType video/ogg "access plus 1 year"
ExpiresByType audio/ogg "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/webm "access plus 1 year"
ExpiresByType audio/mp3 "access plus 1 year"
ExpiresDefault "access plus 1 year"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.