Installing Nginx in Ubuntu 20.04 LTS

The guide below describes how to install the Nginx web server on Ubuntu 20.04 LTS
We will do the whole thing through the console in a few minutes.

We start the terminal and update and install the nginx server

We add the web server to the firewall:

We can verify the status of the Nginx service by issuing the command:

An example result is shown below:

Now we will start creating the file structure for the vhost:

We create the directory structure:

We give permission:

We set chmod

We create an example index.html of our website to validate our configuration:

Contents:

save the file.

We create a new vhost:

And the content:

We're making a symbolic link:

We edit the nginx configuration file

And we uncomment the line:

The whole should look like:

restart the nginx server, our vhost should work properly.

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.