nginx, debian,

How to install Nginx on Debian 11

Aug 22, 2021 · 1 min read · Post a comment

Installing Nginx on Debian 11 is pretty easy and straightforward. This tutorial will show you how to install it and enable HTTP traffic on your Debian server.

Prerequisites

  • Debian 11
  • sudo privileges

Install the latest Nginx version on Debian 11

Step 1. Update system packages.

sudo apt update

Step 2. Install Nginx.

sudo apt install nginx

Step 3. Verify installation.

nginx -v

Output:

nginx version: nginx/1.18.0

Enable HTTP traffic

Step 1. List the application profiles.

sudo ufw app list

Output:

Available applications:
  ...
  Nginx Full
  Nginx HTTP
  Nginx HTTPS
  ...

Step 2. We don’t have configured SSL/TLS yet, so we will only allow HTTP traffic.

sudo ufw allow 'Nginx HTTP'

Step 3. Verify changes.

sudo ufw status

Output:

Status: active

To                         Action      From
--                         ------      ----
...                
Nginx HTTP                 ALLOW       Anywhere
...

Conclusion

As we can see from the installation section, Nginx is available in Debian default repositories which simplifies the installation process. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.