nginx,

How to install Nginx on Ubuntu 21.10

Feb 20, 2022 · 1 min read · Post a comment
How to install Nginx on Ubuntu 21.10

Since Ubuntu 21.10 has been released there was an immediate interest in using it as an OS Server. In this tutorial, we are going to see how to install Nginx on Ubuntu 21.10.

Prerequisites

  • Ubuntu 21.10

Install latest Nginx version on Ubuntu 21.10

Step 1. Get the latest packages with:

sudo apt update

Step 2. To install nginx, run:

sudo apt install nginx

Step 3. Check the version.

nginx -v

Example output:

nginx version: nginx/1.18.0

Enable HTTP traffic

Step 1. Let’s see the application profiles.

sudo ufw app list

Example output:

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

Step 2. Since we don’t have generated SSL certificate yet, we are going to allow HTTP traffic.

sudo ufw allow 'Nginx HTTP'

Step 3. Let’s check if the changes are here.

sudo ufw status

Example output:

Status: active

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

Conclusion

The installation process is pretty simple and straightforward, so let us know if you need anything else. On a side note, follow our official channel on Telegram.