valentine94
10/16/2019 - 7:30 AM

Digital Ocean Nginx setup

sudo apt update
sudo apt install nginx

sudo ufw allow 'Nginx HTTP'
sudo ufw allow 'Nginx HTTPS'

systemctl status nginx

sudo mkdir -p /var/www/example.com/html
sudo chown -R $USER:$USER /var/www/example.com/html
sudo chmod -R 755 /var/www/example.com
nano /var/www/example.com/html/index.html
sudo nano /etc/nginx/sites-available/example.com
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx