{"id":26418,"date":"2018-04-20T03:07:26","date_gmt":"2018-04-20T08:07:26","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=26418"},"modified":"2022-06-03T03:35:06","modified_gmt":"2022-06-03T08:35:06","slug":"how-to-install-and-configure-nginx-on-debian-9","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/","title":{"rendered":"How to Install Nginx on Debian 9"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"alignnone size-full wp-image-27634\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg\" alt=\"How to Install Nginx on Debian 9\" width=\"742\" height=\"371\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>Nginx is a free, open-source and high-performance HTTP server. It is widely used for load balancing,\u00a0\u00a0mail proxy server,\u00a0 generic TCP\/UDP proxy server, it provides reverse proxy configuration, media streaming and much more. It is designed to efficiently serve both low and high traffic websites and it is a very popular alternative to the Apache web server. Nginx is powering a lot of\u00a0heavily loaded websites like Yandex, DropBox, NetFlix, WordPress.<\/p>\n<p>In this tutorial, we will show you how to install and configure Nginx on Debian. Installing Nginx on a Debian server is a very easy task, and if you carefully follow all the instructions provided below, you should have your Nginx server up and running in less than 10 minutes. This tutorial has been written for and tested on Debian 9 VPS.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69ed04a18343b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69ed04a18343b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#1-Login-via-SSH-and-update-the-system\" >1. Login via SSH and update the system<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#2-Install-Nginx-on-Debian-9\" >2. Install Nginx on Debian 9<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#3-Managing-your-Nginx-server\" >3. Managing your Nginx server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#4-Configuring-your-Nginx-web-server\" >4. Configuring your Nginx web server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#5-Verify-the-Nginx-Installation\" >5. Verify the Nginx Installation<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1-Login-via-SSH-and-update-the-system\"><\/span><!--more--><br \/>\n1. Login via SSH and update the system<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before we begin, you will need to login to your server via SSH as user root:<\/p>\n<pre>ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\n<p>and replace \u201cIP_ADDRESS\u201d and \u201cPORT_NUMBER\u201d with your actual server IP address and SSH port number.<\/p>\n<p>Let\u2019s also make sure that your Debian server is up-to-date by running the following command:<\/p>\n<pre>apt-get update &amp;&amp; sudo apt-get upgrade<\/pre>\n<p>Here is a sample of the output you should get:<\/p>\n<pre>Reading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nCalculating upgrade... Done\r\nThe following packages will be upgraded:\r\nlibperl5.24 perl perl-base perl-modules-5.24\r\n4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 7813 kB of archives.\r\nAfter this operation, 9216 B of additional disk space will be used.\r\nDo you want to continue? [Y\/n] Y\r\nGet:1 http:\/\/security.debian.org stretch\/updates\/main amd64 libperl5.24 amd64 5.24.1-3+deb9u3 [3527 kB]\r\nGet:2 http:\/\/security.debian.org stretch\/updates\/main amd64 perl amd64 5.24.1-3+deb9u3 [219 kB]\r\nGet:3 http:\/\/security.debian.org stretch\/updates\/main amd64 perl-base amd64 5.24.1-3+deb9u3 [1344 kB]\r\nGet:4 http:\/\/security.debian.org stretch\/updates\/main amd64 perl-modules-5.24 all 5.24.1-3+deb9u3 [2723 kB]\r\nFetched 7813 kB in 0s (12.0 MB\/s)\r\n(Reading database ... 36668 files and directories currently installed.)\r\nPreparing to unpack ...\/libperl5.24_5.24.1-3+deb9u3_amd64.deb ...\r\nUnpacking libperl5.24:amd64 (5.24.1-3+deb9u3) over (5.24.1-3+deb9u2) ...\r\nPreparing to unpack ...\/perl_5.24.1-3+deb9u3_amd64.deb ...\r\nUnpacking perl (5.24.1-3+deb9u3) over (5.24.1-3+deb9u2) ...\r\nPreparing to unpack ...\/perl-base_5.24.1-3+deb9u3_amd64.deb ...\r\nUnpacking perl-base (5.24.1-3+deb9u3) over (5.24.1-3+deb9u2) ...\r\nSetting up perl-base (5.24.1-3+deb9u3) ...\r\n(Reading database ... 36668 files and directories currently installed.)\r\nPreparing to unpack ...\/perl-modules-5.24_5.24.1-3+deb9u3_all.deb ...\r\nUnpacking perl-modules-5.24 (5.24.1-3+deb9u3) over (5.24.1-3+deb9u2) ...\r\nSetting up perl-modules-5.24 (5.24.1-3+deb9u3) ...\r\nSetting up libperl5.24:amd64 (5.24.1-3+deb9u3) ...\r\nSetting up perl (5.24.1-3+deb9u3) ...\r\nProcessing triggers for libc-bin (2.24-11+deb9u3) ...\r\nProcessing triggers for man-db (2.7.6.1-2) ...<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"2-Install-Nginx-on-Debian-9\"><\/span>2. Install Nginx on Debian 9<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can install Nginx from Debian package repository. Simply, run the following command to install Nginx on your server:<\/p>\n<pre>apt-get install nginx<\/pre>\n<p>You will get the following output:<\/p>\n<pre>Reading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nThe following additional packages will be installed:\r\nlibnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter\r\nlibnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx-common nginx-full\r\nSuggested packages:\r\nfcgiwrap nginx-doc\r\nThe following NEW packages will be installed:\r\nlibnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter\r\nlibnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx nginx-common nginx-full\r\n0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.\r\nNeed to get 0 B\/1585 kB of archives.\r\nAfter this operation, 2865 kB of additional disk space will be used.\r\nDo you want to continue? [Y\/n] y<\/pre>\n<p>After the installation is completed Nginx will be started automatically.<br \/>\nTo verify that Nginx is really running on your server, you can also use the following command:<\/p>\n<pre>systemctl status nginx<\/pre>\n<pre>\u25cf nginx.service - A high performance web server and a reverse proxy server\r\nLoaded: loaded (\/lib\/systemd\/system\/nginx.service; enabled; vendor preset: enabled)\r\nActive: active (running) since Sat 2018-04-14 11:44:12 CDT; 4min 10s ago\r\nDocs: man:nginx(8)\r\nProcess: 6412 ExecStart=\/usr\/sbin\/nginx -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\r\nProcess: 6409 ExecStartPre=\/usr\/sbin\/nginx -t -q -g daemon on; master_process on; (code=exited, status=0\/SUCCESS)\r\nMain PID: 6413 (nginx)\r\nCGroup: \/system.slice\/nginx.service\r\n\u251c\u25006413 nginx: master process \/usr\/sbin\/nginx -g daemon on; master_process on;\r\n\u251c\u25006414 nginx: worker process\r\n\u2514\u25006415 nginx: worker process<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"3-Managing-your-Nginx-server\"><\/span>3. Managing your Nginx server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are a couple of useful commands that you can use to manage your Nginx service.<\/p>\n<p>First, let&#8217;s make sure that your Nginx server is started automatically upon a server reboot:<\/p>\n<pre>systemctl enable nginx<\/pre>\n<pre>Synchronizing state of nginx.service with SysV service script with \/lib\/systemd\/systemd-sysv-install.\r\nExecuting: \/lib\/systemd\/systemd-sysv-install enable nginx<\/pre>\n<p>In case you want to disable the automatic startup upon server reboot, you can use the following command:<\/p>\n<pre>systemctl disable nginx<\/pre>\n<p>To check the status of the Nginx service, run the following command:<\/p>\n<pre>systemctl status nginx<\/pre>\n<p>To start the Nginx service, you can use:<\/p>\n<pre>systemctl start nginx<\/pre>\n<p>To stop the Nginx service, you can use:<\/p>\n<pre>systemctl stop nginx<\/pre>\n<p>You can restart the nginx service with:<\/p>\n<pre>systemctl restart nginx<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"4-Configuring-your-Nginx-web-server\"><\/span>4. Configuring your Nginx web server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, the Nginx installation creates the web server root directory at the following location <strong>\/var\/www\/html\/.<\/strong><br \/>\nThe default configuration file for this is located at the following location: <strong>\/etc\/nginx<\/strong><strong>\/sites-enabled\/default\/<\/strong>.<br \/>\nThe main configuration file for Nginx is located at <strong>\/etc\/nginx\/nginx.conf<\/strong><\/p>\n<p>In this tutorial, we will show you how to create a new server block for a new domain <strong>mydomain.com<\/strong> and set its document root to <strong>\/var\/www\/mydomain.com<\/strong><\/p>\n<p>First, we will need to create the document root directory with the following command:<\/p>\n<pre>mkdir -p \/var\/www\/mydomain.com<\/pre>\n<p>Next, create an index.html file inside this directory and add the following content:<\/p>\n<pre>nano \/var\/www\/mydomain.com\/index.html<\/pre>\n<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n &lt;title&gt;mydomain.com&lt;\/title&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n &lt;h1&gt;Welcome to mydomain.com&lt;\/h1&gt;\r\n &lt;p&gt;This is a test for the mydomain.com server block.&lt;\/p&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>Next, let&#8217;s create a new server block at the following location with:<\/p>\n<p>nano \/etc\/nginx\/sites-available\/mydomain.com.conf<\/p>\n<p>And add the following content:<\/p>\n<pre>server {\r\n       listen 80;\r\n       listen [::]:80;\r\n\r\n       server_name mydomain.com www.mydomain.com;\r\n\r\n       root \/var\/www\/mydomain.com;\r\n       index index.html;\r\n\r\n       location \/ {\r\n               try_files $uri $uri\/ =404;\r\n       }\r\n}<\/pre>\n<p>Save the file. To activate the server block you must create a soft link with the following command:<\/p>\n<pre>ln -s \/etc\/nginx\/sites-available\/mydomain.com.conf \/etc\/nginx\/sites-enabled\/mydomain.com.conf<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"5-Verify-the-Nginx-Installation\"><\/span>5. Verify the Nginx Installation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Test the nginx configuration and restart your nginx with:<\/p>\n<pre>nginx -t\r\nsystemctl restart nginx<\/pre>\n<p>If everything is set up properly as instructed, you should now be able to open mydomain.com in your browser and see the mydomain.com server block you have created before.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-26482\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9.jpg\" alt=\"Install Nginx on Debian 9\" width=\"830\" height=\"439\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9.jpg 830w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-150x79.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-300x159.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-768x406.jpg 768w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-680x360.jpg 680w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-500x264.jpg 500w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-400x212.jpg 400w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-200x106.jpg 200w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/install-nginx-on-debian-9-50x26.jpg 50w\" sizes=\"(max-width: 830px) 100vw, 830px\" \/><\/p>\n<p>That is all. Nginx has been successfully installed and configured on your Debian 9 server.<\/p>\n<hr \/>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-27636\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/Installing-Nginx-on-Debian-9.jpg\" alt=\"Installing Nginx on Debian 9\" width=\"180\" height=\"206\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/Installing-Nginx-on-Debian-9.jpg 180w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/Installing-Nginx-on-Debian-9-131x150.jpg 131w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/>Of course, you don\u2019t have to install and configure Nginx on Debian 9, if you use one of our\u00a0<a href=\"https:\/\/www.rosehosting.com\/nginx-hosting.html\">Optimized Nginx Web Hosting Solutions<\/a>, in which case you can simply ask our expert Linux admins to install and configure Nginx on Debian 9 for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>PS<\/strong>.<\/span> If you liked this post on how to install and configure Nginx on Debian 9, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx is a free, open-source and high-performance HTTP server. It is widely used for load balancing,\u00a0\u00a0mail proxy server,\u00a0 generic TCP\/UDP &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install Nginx on Debian 9\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#more-26418\" aria-label=\"Read more about How to Install Nginx on Debian 9\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":27634,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1700,1707],"tags":[48,49],"class_list":["post-26418","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","category-web-servers","tag-debian","tag-nginx","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install Nginx on Debian 9 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install Nginx on Debian 9 | RoseHosting\" \/>\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.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Nginx on Debian 9\" \/>\n<meta property=\"og:description\" content=\"How to Install Nginx on Debian 9 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-20T08:07:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-03T08:35:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"371\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install Nginx on Debian 9\",\"datePublished\":\"2018-04-20T08:07:26+00:00\",\"dateModified\":\"2022-06-03T08:35:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/\"},\"wordCount\":654,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-Install-Nginx-on-Debian-9.jpg\",\"keywords\":[\"debian\",\"nginx\"],\"articleSection\":[\"Debian\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/\",\"name\":\"How to Install Nginx on Debian 9 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-Install-Nginx-on-Debian-9.jpg\",\"datePublished\":\"2018-04-20T08:07:26+00:00\",\"dateModified\":\"2022-06-03T08:35:06+00:00\",\"description\":\"How to Install Nginx on Debian 9 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-Install-Nginx-on-Debian-9.jpg\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/04\\\/How-to-Install-Nginx-on-Debian-9.jpg\",\"width\":742,\"height\":371,\"caption\":\"How to Install Nginx on Debian 9\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/how-to-install-and-configure-nginx-on-debian-9\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Nginx on Debian 9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install Nginx on Debian 9 | RoseHosting","description":"How to Install Nginx on Debian 9 | RoseHosting","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.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Nginx on Debian 9","og_description":"How to Install Nginx on Debian 9 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2018-04-20T08:07:26+00:00","article_modified_time":"2022-06-03T08:35:06+00:00","og_image":[{"width":742,"height":371,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install Nginx on Debian 9","datePublished":"2018-04-20T08:07:26+00:00","dateModified":"2022-06-03T08:35:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/"},"wordCount":654,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg","keywords":["debian","nginx"],"articleSection":["Debian","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/","name":"How to Install Nginx on Debian 9 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg","datePublished":"2018-04-20T08:07:26+00:00","dateModified":"2022-06-03T08:35:06+00:00","description":"How to Install Nginx on Debian 9 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2018\/04\/How-to-Install-Nginx-on-Debian-9.jpg","width":742,"height":371,"caption":"How to Install Nginx on Debian 9"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-and-configure-nginx-on-debian-9\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install Nginx on Debian 9"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/26418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=26418"}],"version-history":[{"count":1,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/26418\/revisions"}],"predecessor-version":[{"id":41816,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/26418\/revisions\/41816"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/27634"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=26418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=26418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=26418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}