Advertisement
fplanzer

Gzip Deflate

Apr 30th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.09 KB | None | 0 0
  1. https://geektnt.com/how-to-enable-mod_deflate-on-apache-2-4.html
  2.  
  3.  
  4. <IfModule prefork.c>
  5. StartServers 2
  6. MinSpareServers 2
  7. MaxSpareServers 5
  8. MaxClients 150
  9. MaxRequestsPerChild 500
  10. </IfModule>
  11.  
  12.  
  13. <IfModule mod_deflate.c>
  14. SetOutputFilter DEFLATE
  15. SetEnvIfNoCase Request_URI \.(?:gif|jpg|png|ico|zip|gz|mp4|flv)$ no-gzip
  16. </IfModule>
  17.  
  18.  
  19.  
  20. ifModule mod_gzip.c>
  21. mod_gzip_on Yes
  22. mod_gzip_dechunk Yes
  23. mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  24. mod_gzip_item_include handler ^cgi-script$
  25. mod_gzip_item_include mime ^text/.*
  26. mod_gzip_item_include mime ^application/x-javascript.*
  27. mod_gzip_item_exclude mime ^image/.*
  28. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  29. </ifModule>
  30.  
  31. # WPhtC: Setting mod_deflate
  32. <IfModule mod_deflate.c>
  33. AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
  34. BrowserMatch ^Mozilla/4 gzip-only-text/html
  35. BrowserMatch ^Mozilla/4.0[678] no-gzip
  36. BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  37. Header append Vary User-Agent env=!dont-vary
  38. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement