{"id":207,"date":"2009-10-10T17:15:31","date_gmt":"2009-10-10T21:15:31","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=207"},"modified":"2013-03-20T08:40:06","modified_gmt":"2013-03-20T12:40:06","slug":"howto-enable-http-compression","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/howto-enable-http-compression","title":{"rendered":"Howto: enable HTTP Compression"},"content":{"rendered":"<p><strong>How to enable HTTP Compression?<\/strong> In order to enable compression, you will need compression modules compiled with Apache. <strong>Apache 1.x needs mod_gzip and Apache 2.x need mod_deflate<\/strong> compiled with it.<\/p>\n<p>If\u00a0 you have these module installed, you need to <strong>edit your Apache configuration<\/strong> file locate at &#8220;\/etc\/httpd\/conf\/httpd.conf&#8221; file and <strong>add the following lines to it<\/strong>:<\/p>\n<blockquote><p><span style=\"color: #0000ff;\"><strong>&lt;Location \/&gt;<br \/>\nSetOutputFilter DEFLATE<br \/>\nSetEnvIfNoCase Request_URI\u00a0 \\<br \/>\n\\.(?:gif|jpe?g|png)$ no-gzip dont-vary<br \/>\n&lt;\/Location&gt;<\/strong><\/span><\/p><\/blockquote>\n<p>Save the file and restart the httpd service. This will <strong>compress all the files except the .gif, .jpe, .jpeg and .png files.<\/strong><\/p>\n<p><span style=\"color: #0000ff;\"><strong>Related URLs:<\/strong><\/span><br \/>\n<a title=\"How to enable http compression on a Plesk server?\" href=\"https:\/\/linuxhostingsupport.net\/blog\/how-to-enable-http-compression-on-a-plesk-server\" target=\"_blank\">How to enable http compression on a Plesk server?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to enable HTTP Compression? In order to enable compression, you will need compression modules compiled with Apache. Apache 1.x needs mod_gzip and Apache 2.x need mod_deflate compiled with it.<br \/>\nIf\u00a0 you have these module installed, you need to edit your Apache configuration file locate at &#8220;\/etc\/httpd\/conf\/httpd.conf&#8221; file and add the following lines to it:<br \/>\n&lt;Location \/&gt;<br \/>\nSetOutputFilter DEFLATE<br \/>\nSetEnvIfNoCase Request_URI\u00a0 \\<br \/>\n\\.(?:gif|jpe?g|png)$ no-gzip dont-vary<br \/>\n&lt;\/Location&gt;<br \/>\nSave the file and restart the httpd service. This will compress all the files except the .gif, .jpe, .jpeg and .png files.<br \/>\nRelated URLs:<br \/>\nHow to enable http compression on a [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[228,229,231,227,233,232,230],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/207"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"predecessor-version":[{"id":2122,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/207\/revisions\/2122"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}