{"id":1728,"date":"2022-12-01T12:30:00","date_gmt":"2022-12-01T18:30:00","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1728"},"modified":"2022-12-05T07:16:57","modified_gmt":"2022-12-05T13:16:57","slug":"improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/","title":{"rendered":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04"},"content":{"rendered":"\n<div id=\"linux-988079300\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>A website&#8217;s performance depends on many factors, and choosing a suitable web server is one of them. You can choose from many web servers, like Apache, LiteSpeed, Nginx, etc.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.rosehosting.com\/nginx-hosting\/\" title=\"\">Nginx<\/a> is an open-source web server, it was initially developed by Igor Sysoev and released in October 2004. In Nginx, gzip compression can significantly reduce the size of transmitted data to website visitors.<\/p>\n\n\n\n<p>Modern web browsers support GZIP compression by default. However, we need to configure our server to serve the compressed resources to our website visitors properly. Without a proper configuration, it could make your server load higher and even slower. This article will show you how to improve website performance using GZIP and Nginx on Ubuntu 22.04.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h1 class=\"wp-block-heading\">Prerequisites<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 22.04<\/li>\n\n\n\n<li>SSH access with root privileges or a regular system user with sudo privileges<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What is GZIP Compression<\/h2>\n\n\n\n<p>GZIP or GNU zip is an open-source algorithm for file compression. GZIP compresses your website resources, such as Javascript and CSS files, while serving requests to the web browsers. It compresses text files effectively, while image files are not compressed because they have some built-in compression.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Enable GZIP Compression<\/h2>\n\n\n\n<p>To enable compression in Nginx, simply include the following directives in your nginx.conf file, or comment them out if you already have the lines.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gzip on;\ngzip_vary on;\ngzip_comp_level 6;\ngzip_types text\/plain text\/css application\/json application\/javascript text\/xml application\/xml application\/xml+rss text\/javascript;<\/pre>\n\n\n\n<p>Save and close the file, then verify Nginx for any syntax errors:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nginx -t<\/pre>\n\n\n\n<p>You should get the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nginx: the configuration file \/etc\/nginx\/nginx.conf syntax is ok\nnginx: configuration file \/etc\/nginx\/nginx.conf test is successful<\/pre>\n\n\n\n<p>Next, restart the Nginx service using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart nginx<\/pre>\n\n\n\n<p>Then check the status.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl status nginx<\/pre>\n\n\n\n<p>You should see the following output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u25cf nginx.service - A high performance web server and a reverse proxy server\nLoaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\nActive: active (running) since Mon 2022-09-19 17:51:13 WIB; 1s ago\nDocs: man:nginx(8)\nProcess: 1249555 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\nProcess: 1249574 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\nMain PID: 1249579 (nginx)\nTasks: 3 (limit: 4532)\nMemory: 4.4M\nCGroup: \/system.slice\/nginx.service\n\u251c\u25001249579 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\n\u251c\u25001249580 nginx: worker process\n\u2514\u25001249581 nginx: worker process\n\nSep 19 17:51:12 home systemd[1]: Starting A high performance web server and a reverse proxy server...\nSep 19 17:51:13 home systemd[1]: Started A high performance web server and a reverse proxy server.<\/pre>\n\n\n\n<p>The following are explanations of our directives to enable and configure gzip in nginx.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gzip on;<\/pre>\n\n\n\n<p>The directive above should be turned on to enable gzipping of responses.<\/p>\n\n\n\n<p>In <em>gzip_type<\/em> directive, you can add another MIME type because, by default, Nginx compresses responses only with MIME type text\/thml.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gzip_types text\/plain text\/css application\/json application\/javascript text\/xml application\/xml application\/xml+rss text\/javascript;<\/pre>\n\n\n\n<p>To set gzip compression level, you can add <em>gzip_comp_level<\/em> directive. The value should be between 1 and 9. The higher the value, the higher the compression. Please note that the most compressed data usually requires more work to compress or decompress, so if you have it set fairly high on a busy website, you may see the difference in your CPU usage.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gzip_comp_level 6;<\/pre>\n\n\n\n<p>Another directive, <em>gzip_vary<\/em> is optional. It is used to enable or disable inserting the \u201cVary: Accept-Encoding\u201d response header. This header inform the browsers if the client can handle the compressed version of the website or not, especially when your Nginx server is behind CDN or another reverse caching server. If gzip_vary is enabled, you will see vary: Accept-Encoding in the header response, like the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">HTTP\/2 200 \nserver: nginx\ndate: Mon, 19 Sep 2022 10:25:15 GMT\ncontent-type: text\/html\ncontent-length: 14512\nlast-modified: Sat, 22 Jan 2022 13:53:28 GMT\nvary: Accept-Encoding\netag: \"61ec0c58-38b0\"\naccept-ranges: bytes<\/pre>\n\n\n\n<p>Since compression happens at runtime, it can add considerable processing overhead, which can negatively affect your server performance. You can lower your <em>gzip_comp_level<\/em> if you think your CPU usage is abnormally higher after enabling gzip in Nginx.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Verify GZIP is working?<\/h2>\n\n\n\n<p>There are several ways to verify whether the gzip compression is working or not. You can use an online tool like <a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/insights\/\">Google PageSpeed Insights<\/a> to check it, or use your browser&#8217;s developer tools, or even simply use the curl shell command as follow:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ curl -I -H 'Accept-Encoding: gzip,deflate' https:\/\/www.rosehosting.com\/<\/pre>\n\n\n\n<p>The command above will show you an output like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">HTTP\/2 200 \nserver: nginx\ndate: Mon, 19 Sep 2022 09:52:28 GMT\ncontent-type: text\/html\nlast-modified: Sat, 22 Jan 2022 13:53:28 GMT\netag: W\/\"61ec0c58-38b0\"\ncontent-encoding: gzip<\/pre>\n\n\n\n<p>As we can see in the output, the website is compressed using gzip (content-encoding: gzip).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Compare GZIP and Plain Text<\/h2>\n\n\n\n<p>After enabling gzip compression, you can compare the files transmitted by nginx to you by simply running these commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ curl -s --output uncompressed https:\/\/www.rosehosting.com\/\n$ curl -s --output compressed -H 'Accept-Encoding: gzip,deflate' https:\/\/www.rosehosting.com\/<\/pre>\n\n\n\n<p>Then, run &#8216;ls -lh&#8217; or &#8216;ll -h&#8217; command to see the file size.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/09\/curl-check-gzip.jpg\" alt=\"\" class=\"wp-image-43095\"\/><\/figure>\n\n\n\n<p>As seen above, the compressed file has a lower file size. The lower the file size, the faster your website is and the higher number of concurrent visitors your server can handle.<\/p>\n\n\n\n<p>Congratulations! You have successfully improved your website performance using gzip and Nginx on Ubuntu 22.04.<\/p>\n\n\n\n<p>Of course, if you are one of our <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting\/\">Ubuntu Hosting<\/a> customers, you don\u2019t have to improve your website performance using gzip and Nginx yourself \u2013 simply ask our admins, sit back, and relax. Our admins will improve your website performance using gzip and Nginx for you immediately without any additional fee, along with many useful optimizations that we can do for you. Improving your website performance using gzip and Nginx is not just about the installation; we can help you with optimizing your website if you have a VPS with us.<\/p>\n\n\n\n<p>If you liked this post about how to improve your website performance using gzip and Nginx on Ubuntu 22.04, please share it with your friends on the social networks using the share buttons below, or simply leave a comment in the comments section. Thanks.<\/p><div id=\"linux-3827371581\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A website&#8217;s performance depends on many factors, and choosing a suitable web server is one of them. You can choose from many web servers, like Apache, LiteSpeed, Nginx, etc. Nginx is an open-source web server, it was initially developed by Igor Sysoev and released in October 2004. In Nginx, gzip compression can significantly reduce the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,2,182],"tags":[23,22,232],"class_list":["post-1728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guides","category-tutorials","category-ubuntu","tag-gzip","tag-nginx","tag-ubuntu-22-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport<\/title>\n<meta name=\"description\" content=\"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let&#039;s get started\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport\" \/>\n<meta property=\"og:description\" content=\"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let&#039;s get started\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-01T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-05T13:16:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04\",\"datePublished\":\"2022-12-01T18:30:00+00:00\",\"dateModified\":\"2022-12-05T13:16:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\"},\"wordCount\":766,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp\",\"keywords\":[\"gzip\",\"nginx\",\"ubuntu 22.04\"],\"articleSection\":[\"Guides\",\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\",\"name\":\"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport\",\"isPartOf\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp\",\"datePublished\":\"2022-12-01T18:30:00+00:00\",\"dateModified\":\"2022-12-05T13:16:57+00:00\",\"author\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let's get started\",\"breadcrumb\":{\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp\",\"contentUrl\":\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp\",\"width\":742,\"height\":372,\"caption\":\"improve website performance using gzip and nginx on ubuntu 22.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/linuxhostsupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#website\",\"url\":\"https:\/\/linuxhostsupport.com\/blog\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport","description":"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let's get started","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:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/","og_locale":"en_US","og_type":"article","og_title":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport","og_description":"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let's get started","og_url":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2022-12-01T18:30:00+00:00","article_modified_time":"2022-12-05T13:16:57+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04","datePublished":"2022-12-01T18:30:00+00:00","dateModified":"2022-12-05T13:16:57+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/"},"wordCount":766,"commentCount":0,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp","keywords":["gzip","nginx","ubuntu 22.04"],"articleSection":["Guides","Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/","name":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04 | LinuxHostSupport","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp","datePublished":"2022-12-01T18:30:00+00:00","dateModified":"2022-12-05T13:16:57+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"Read our article and learn how to improve website performance using GZIP and Nginx on Ubuntu 22.04. Let's get started","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2022\/12\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04.webp","width":742,"height":372,"caption":"improve website performance using gzip and nginx on ubuntu 22.04"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/improve-website-performance-using-gzip-and-nginx-on-ubuntu-22-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Improve Website Performance Using gzip and Nginx on Ubuntu 22.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1728"}],"version-history":[{"count":4,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1728\/revisions"}],"predecessor-version":[{"id":1750,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1728\/revisions\/1750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1744"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}