Advance

How To Install Nginx on Ubuntu 20.04 LTS

How to Install Nginx on Ubuntu 20.04 LTS
2.5
(2)

[Updated on Date: 2021-01-21] As an administrator of high-traffic websites, you need a high-performance web server. Nginx is an open-source and popular web server with global fame. Also, you can use it as a reverse proxy. In this article, you will learn How To Install Nginx on Ubuntu 20.04 LTS. In case you are not sure to purchase a Linux VPS, our perfect packages would be satisfying. Either you can buy your own Ubuntu VPS and continue learning this guide.

Recommended Article: How To Set Up SSH keys On Ubuntu 20.04

To let this tutorial work better, please consider the below Prerequisites:

A non-root user with sudo privileges.

To set up, follow our Initial server setup on Ubuntu 20.04.

Install Nginx on Ubuntu 20.04 | Ubuntu 18.04

Nginx has been released under the 2-clause BSD License and you can install to on your Ubuntu server in about 20 minutes. Nginx is available in Ubuntu’s default repositories. So, you can install the repositories by apt packaging system. Let’s go through the steps of this guide to learn and finish it.

Step 1: Install Nginx

First, you should update the local package with the below command:

sudo apt update  

Then install Nginx with the command below:

sudo apt install nginx  

Step 2: Adjusting the Firewall on ubuntu 20.04

First, you need to enable the UFW firewall. Then Check the available UFW firewall application profiles with the command below:

sudo ufw app list  

Output:

Available applications:  Nginx Full  Nginx HTTP  Nginx HTTPS  OpenSSH  

Now enable permitting traffic on port 80:

sudo ufw allow 'Nginx HTTP'  

You should Verify the change:

sudo ufw status  
Recommended Article: How To Install Nginx on Ubuntu 20.04 LTS

Step 3: Check Web Server

Check to see if the webserver is running:

systemctl status nginx  

Then you should check Access the default Nginx landing page in the browser with the command below:

http://your_server_ip  

After entering the IP address on the browser, you should see the default Nginx landing page:

Install Nginx

 

Conclusion

In this article, you learned How To Install Nginx on Ubuntu 20.04. From now on, you can configure PHP, Python, Perl, and Ruby apps or install TLS, SSL certificates to secure traffic. In case you are interested in reading more, find our related article on How to install Nginx on Debian 10.

How useful was this post?

Click on a star to rate it!

Average rating 2.5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day