Skip to content

Instantly share code, notes, and snippets.

@Jany-M Jany-M/expires.conf
Last active Apr 5, 2018

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 image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType image/ico "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
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 application/pdf "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 days"
ExpiresByType text/javascript "access plus 7 days"
ExpiresByType text/css "access plus 1 month"
ExpiresDefault "access plus 1 days"
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.