• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[LINUX] Installing NGINX on Ubuntu 22.04

Luan Luciano

Member
Joined
Apr 28, 2014
Messages
59
Reaction score
22
GitHub
luanluciano93
Hello, this tutorial is a part of the main topic: "Full infrastructure tutorial to start a TF 1.x server on Ubuntu 22.04" ...

It is part of the 1st installation of the LEMP stack on Ubuntu 22.04: NGINX.

STEP 1 - HOW TO INSTALL THE NGINX WEB SERVER

To show web pages to your site visitors, we are going to use Nginx, a high performance web server. We will use the following command to install Nginx:
Code:
sudo apt install nginx
When prompted, enter Y to confirm that you want to install Nginx. Once the installation is complete, the Nginx web server will be up and running on your machine.

Now check the status of Nginx to see if it is correctly active:
Code:
sudo systemctl status nginx

Something like this should appear:

image.png.2dedf409a986d1ceff60ca54753be859.png

As you can see in green: active (running), that is, it is active and working.

You can also check the version of nginx installed with the command:
Code:
nginx -v

I got as answer on 14NOV22: nginx version: nginx/1.18.0 (Ubuntu)

STEP 2 - RELEASING THE PORTS ON THE FIREWALL

Here the answer would be quite broad as you should know what kind of firewall you are using.


If you have the UFW firewall enabled, you will need to allow Nginx connections. Nginx registers a few different application profiles in UFW after installation. To check which UFW profiles are available, run:
Code:
sudo ufw app list

The options will appear:

image.png.fff16df90cd44142f3f2c882526d48ae.png

It is recommended that you enable the most restrictive profile which will still allow the traffic you need. In case you haven't already configured SSL (HTTPS) for your server, you just need to allow regular HTTP traffic on port 80 using the command:
Code:
sudo ufw allow 'Nginx HTTP'

Verify the change by running:
Code:
sudo ufw status

STEP 3 - TESTING IF NGINX IS WORKING

Enter the IP or the DOMAIN of your machine through the browser, if the following page appears, everything is correct.

image.png.2b2030ef87460f45ee8b49a2b4737a7b.png

If this page does not load, you are probably blocked by the firewall (firewall different from the ones I mentioned above)

That's it at first!

Siga as atualizações no tópico principal: "Full infrastructure tutorial to start a TF 1.x server on Ubuntu 22.04" ...

Sources:
 
Back
Top