Skip to content

Instantly share code, notes, and snippets.

@Jany-M
Last active January 27, 2020 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jany-M/2d19ff8fc00a642b7302e5ed20d5c45b to your computer and use it in GitHub Desktop.
Save Jany-M/2d19ff8fc00a642b7302e5ed20d5c45b to your computer and use it in GitHub Desktop.
[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