{"id":8163,"date":"2019-08-27T11:46:44","date_gmt":"2019-08-27T11:46:44","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=8163"},"modified":"2023-02-21T17:45:42","modified_gmt":"2023-02-21T12:15:42","slug":"how-to-enable-gzip-compression-for-nginx-per-site","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/","title":{"rendered":"How to Enable gzip Compression for Nginx Per Site?"},"content":{"rendered":"<p>Generally, gzip compression isn\u2019t enabled by Nginx for serving files. If CSS and Javascript files aren\u2019t minified or pre-compressed, gzip compression is commonly used to reduce the filesize of these files. This guide will display the way to enable it per site for a Plesk 12.5 or Onyx based server.<br \/>\nInstructions<\/p>\n<ol>\n<li>Login to your Plesk server.<\/li>\n<li>From the left hand side, select the domain that you want to enable <strong>gzip<\/strong> for.<\/li>\n<li>Click on <strong>Apache and nginx settings<\/strong> as below:<br \/>\n<a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8165\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\" alt=\"\" width=\"796\" height=\"529\" srcset=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png 796w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min-300x199.png 300w, https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min-768x510.png 768w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/a><\/li>\n<li>At the bottom, add the following to the <strong>&#8220;Additional nginx directives&#8221;<\/strong> field:\n<p class=\"lang:default decode:true \">gzip on; gzip_disable &#8220;MSIE [1-6]\\.(?!.*SV1)&#8221;; gzip_proxied any; gzip_types text\/plain text\/css application\/x-javascript application\/javascript text\/xml application\/xml application\/xml+rss text\/javascript image\/x-icon image\/bmp image\/svg+xml; gzip_vary on;<\/p>\n<\/li>\n<li>In order to save, click on <strong>OK<\/strong>.<\/li>\n<\/ol>\n<p>The working of gzip compression can be verified by using your browser\u2019s debug tools or third party website such as GTMetrix.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Generally, gzip compression isn\u2019t enabled by Nginx for serving files. If CSS and Javascript files aren\u2019t minified or pre-compressed, gzip compression is commonly used to reduce the filesize of these files. This guide will display the way to enable it per site for a Plesk 12.5 or Onyx based server. Instructions Login to your Plesk [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[941,992,872],"class_list":["post-8163","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-plesk-faq","tag-enable-gzip-compression","tag-gzip-on-nginx","tag-nginx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Enable gzip Compression for Nginx Per Site?<\/title>\n<meta name=\"description\" content=\"The article gives a complete idea about enabling the gzip compression for Nginx site.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Enable gzip Compression for Nginx Per Site?\" \/>\n<meta property=\"og:description\" content=\"The article gives a complete idea about enabling the gzip compression for Nginx site.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-27T11:46:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-21T12:15:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\" \/>\n<meta name=\"author\" content=\"Pallavi Godse\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pallavi Godse\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\"},\"author\":{\"name\":\"Pallavi Godse\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"headline\":\"How to Enable gzip Compression for Nginx Per Site?\",\"datePublished\":\"2019-08-27T11:46:44+00:00\",\"dateModified\":\"2023-02-21T12:15:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\"},\"wordCount\":169,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\",\"keywords\":[\"enable gzip compression\",\"gzip on Nginx\",\"Nginx\"],\"articleSection\":[\"Plesk FAQ\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\",\"name\":\"How to Enable gzip Compression for Nginx Per Site?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\",\"datePublished\":\"2019-08-27T11:46:44+00:00\",\"dateModified\":\"2023-02-21T12:15:42+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\"},\"description\":\"The article gives a complete idea about enabling the gzip compression for Nginx site.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png\",\"width\":796,\"height\":529},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Enable gzip Compression for Nginx Per Site?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945\",\"name\":\"Pallavi Godse\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g\",\"caption\":\"Pallavi Godse\"},\"description\":\"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.\",\"sameAs\":[\"https:\/\/www.milesweb.in\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Enable gzip Compression for Nginx Per Site?","description":"The article gives a complete idea about enabling the gzip compression for Nginx site.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/","og_locale":"en_US","og_type":"article","og_title":"How to Enable gzip Compression for Nginx Per Site?","og_description":"The article gives a complete idea about enabling the gzip compression for Nginx site.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2019-08-27T11:46:44+00:00","article_modified_time":"2023-02-21T12:15:42+00:00","og_image":[{"url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png","type":"","width":"","height":""}],"author":"Pallavi Godse","twitter_misc":{"Written by":"Pallavi Godse","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/"},"author":{"name":"Pallavi Godse","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"headline":"How to Enable gzip Compression for Nginx Per Site?","datePublished":"2019-08-27T11:46:44+00:00","dateModified":"2023-02-21T12:15:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/"},"wordCount":169,"commentCount":0,"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png","keywords":["enable gzip compression","gzip on Nginx","Nginx"],"articleSection":["Plesk FAQ"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/","name":"How to Enable gzip Compression for Nginx Per Site?","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png","datePublished":"2019-08-27T11:46:44+00:00","dateModified":"2023-02-21T12:15:42+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945"},"description":"The article gives a complete idea about enabling the gzip compression for Nginx site.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#primaryimage","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2019\/08\/nginx-enable-gzip-per-domain-min.png","width":796,"height":529},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-enable-gzip-compression-for-nginx-per-site\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Enable gzip Compression for Nginx Per Site?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/7e3952607fa9eb4e82fea9f7cad9c945","name":"Pallavi Godse","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3602d0ac1ab89332aea8205dcf474af4ff4eb319cfd584544038908cd5e4c966?s=96&d=blank&r=g","caption":"Pallavi Godse"},"description":"Pallavi is a Digital Marketing Executive at MilesWeb and has an experience of over 4 years in content development. She is interested in writing engaging content on business, technology, web hosting and other topics related to information technology.","sameAs":["https:\/\/www.milesweb.in"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/pallavi\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=8163"}],"version-history":[{"count":3,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8163\/revisions"}],"predecessor-version":[{"id":17544,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/8163\/revisions\/17544"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=8163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=8163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=8163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}