{"id":440,"date":"2023-03-12T23:31:59","date_gmt":"2023-03-12T21:31:59","guid":{"rendered":"https:\/\/www.nonamehosts.com\/blog\/?p=440"},"modified":"2023-03-12T23:36:00","modified_gmt":"2023-03-12T21:36:00","slug":"how-to-install-nginx-on-debian-11","status":"publish","type":"post","link":"https:\/\/www.nonamehosts.com\/blog\/tutorials\/how-to-install-nginx-on-debian-11\/","title":{"rendered":"How to install nginx on debian 11"},"content":{"rendered":"\n<p>NGINX is a free, open-source web server that is well-known for its high performance, stability, and low resource consumption. It can be used to serve static and dynamic content, reverse proxy, load balance, and cache HTTP requests. In this blog post, we will go through the step-by-step process of installing NGINX on Debian 11.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p><strong>Step 1: Update the System<\/strong><\/p>\n\n\n\n<p>Before starting the installation process, it is important to update the Debian system to ensure that all the packages are up to date. To do this, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade<\/code><\/pre>\n\n\n\n<p><strong>Step 2: Install NGINX<\/strong><\/p>\n\n\n\n<p>To install NGINX on Debian 11, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nginx<\/code><\/pre>\n\n\n\n<p>This will install NGINX along with its dependencies. After the installation is complete, you can check the status of the NGINX service using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>sudo systemctl&nbsp;status&nbsp;nginx<\/code><\/code><\/pre>\n\n\n\n<p>If NGINX is running, you will see a message indicating that the service is active.<\/p>\n\n\n\n<p><strong>Step 3: Configure Firewall<\/strong><\/p>\n\n\n\n<p>By default, Debian 11 comes with a firewall called <code>nftables<\/code>. If the firewall is enabled, you need to allow incoming HTTP and HTTPS traffic through the firewall. To do this, run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install nftables\nsudo nft add rule inet filter input tcp dport {80,443} ct state new,established counter accept\nsudo systemctl enable nftables\nsudo systemctl start nftables<\/code><\/pre>\n\n\n\n<p><strong>Step 4: Verify Installation<\/strong><\/p>\n\n\n\n<p>After installing NGINX and configuring the firewall, you can verify that NGINX is working by opening a web browser and navigating to the server&#8217;s IP address. If NGINX is running correctly, you will see the default NGINX welcome page.<\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>In this blog post, we have gone through the step-by-step process of installing NGINX on Debian 11. By following these steps, you should now have a working installation of NGINX on your Debian 11 system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NGINX is a free, open-source web server that is well-known for its high performance, stability, and low resource consumption. It can be used to serve static and dynamic content, reverse proxy, load balance, and cache HTTP requests. In this blog post, we will go through the step-by-step process of installing NGINX on Debian 11.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[57,68],"class_list":["post-440","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-howto","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/comments?post=440"}],"version-history":[{"count":7,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/440\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/440\/revisions\/448"}],"wp:attachment":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/media?parent=440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/categories?post=440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/tags?post=440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}