Nginx
nginx¶
nginx is a free webserver for linux
Install and start up Nginx¶
See also: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04
Install nginx:
sudo apt update
sudo apt install nginx
Adjust ufw firewall to allow nginx to attach to HTTPS and HTTP ports:
sudo ufw app list
sudo ufw allow 'Nginx Full'
sudo ufw status
Note: You may have to stop the apache2 server and disable it from executing on startup
sudo systemctl stop apache2
sudo systemctl disable apache2
Start nginx and set it to start on bootup
sudo systemctl start nginx
sudo systemctl enable nginx
Note: start - starts the service now, enable - symlinks the service into the start on bootup folder
It is important to setup nginx server blocks that serve the urls being passed to nginx correctly.