Skip to content

Instantly share code, notes, and snippets.

@macariojames
Created January 27, 2019 20:16
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 macariojames/b85cf06348f64b9b8ad6070e108e0cd2 to your computer and use it in GitHub Desktop.
Save macariojames/b85cf06348f64b9b8ad6070e108e0cd2 to your computer and use it in GitHub Desktop.
For gzip compression - Add to Apache conf file
<Directory /var/www/html/>
<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>
</IfModule>
Header append Vary User-Agent env=!dont-vary
</Directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment