Installing Nginx on a VPS Server
Let's install Nginx on our VPS server. First, execute the following command:
apt install software-properties-common
Now let's get the latest version of Nginx:
apt-add-repository ppa:nginx/stable
Next, update the package lists from the repositories:
apt update
Install Nginx:
apt install nginx
Add Nginx to autostart, so it starts automatically after server reboot:
systemctl enable nginx
Let's check that Nginx is installed:
nginx -v
Install Nginx.