Instructions for installing Nginx on Ubuntu 18.04

Install Nginx on Ubuntu 18 - Nginx is one of the most popular web servers in the world and is used on websites with heavy traffic. It is more server-friendly than Apache in many cases and can be used as a web server or Reverse Proxy.

In this article, HOSTVN will guide you to install the latest version of Nginx on Ubuntu 18.04. At the time of writing the latest version is 1.17.10

Instructions for installing Nginx on Ubuntu 18

To get started, you need a VPS with Ubuntu 18.04. If you do not have a VPS, immediately refer to the packages Cloud VPS of the HOSTVN.

REGISTER NOW

1. Step 1: Install the necessary packages

First you need to install the necessary packages with the following command

1. Step 1: Create a source repository

Next, you create a source file repository for Nginx.

  • If you want to install Nginx stable version (v1.16) you run the following command
  • If you want to install Nginx Mainline version (1.17) you run the following command

To verify the integrity of the packages downloaded from this repository, you need to enter the Nginx public key with the command below

Proceed to Verify key with the following command

Screenshot_189

Finally, proceed to update with the following command

2. Step 2: Install Nginx

To install Nginx you just need to run the following command

After the installation process is complete, run the following two commands to start Nginx

To check the installed Nginx version, use the following command

Screenshot_187

3. Note

In version 1.17 Nginx has removed the directories modules-available, modules-enabled, sites-available, sites-enabled, snippets and the structure of / etc / nginx will be the same as Nginx on CentOS, this time the vhost files will be loaded in the directory conf.d

Install Nginx on Ubuntu

4. Video tut

5. References

6. Conclusion

In this article HOSTVN I have instructed you to install the latest version of Nginx on Ubuntu 18.04. If you have any comments you can leave a comment below. Also you can see more Instructions on how to install LEMP on Centos 7.

email-business-leaderboard-blog-v3.png
About My name is Nguyen Manh Cuong. I was born in a poor village in Ba Vi district, HA NOI province - windy and sunny land. Currently. https://www.nguyendiep.com/. Mr Cuong.
Newer Posts Newer Posts Older Posts Older Posts

Comments

Post a Comment