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
Install latest Nginx version on Debian 11
Step 1. Update the packages:
sudo apt update
Step 2. Install nginx:
sudo apt install nginx
Step 3. Verify the 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 yet, so we will only allow HTTP traffic:
sudo ufw allow 'Nginx HTTP'
Step 3. Verify the 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.
