I will explain the procedure for configuring a Digitalocean droplet and setting up Nginx for this droplet.
Configure the Digitalocean droplet
At first, sign up on the Digitalocean platform . After going to the home page click on the Create Button in the upper side
Choose droplets
After coming to the new page, choose your datacenter closest to your main traffic. Then choose the OS, I will be doing this with Ubuntu 22.04LTS. Choose the package and sign-in method. I will be adding my SSH key here.
Install and configure Nginx
Login to the server by using your terminal. If you added your ssh key, then you can do this
ssh root@192.123.222.11
We will now install Nginx by doing
sudo apt update
sudo apt install nginx
After completing the installation , we will configure the firewall. We will now open both port 80 and 443 by running below command
sudo ufw allow 'Nginx FULL'
Verify it by running
sudo ufw status
This will show
Now verify the whole Nginx installation by
systemctl status nginx
From the web browser, enter the IP in the browser
Congrats! The nginx is installed successfully on a digitalocean droplet.
Top comments (0)