nginx
Serving static files from /var/www/html with gzip, cache headers and basic security headers enabled.
Hello from your server
This page replaces the default nginx welcome screen. Edit
index.html and styles.css in your project folder on the
server, run sudo bash deploy.sh again, and refresh the browser.
Serving static files from /var/www/html with gzip, cache headers and basic security headers enabled.
System installed and updated with apt update && apt upgrade -y. Keep it current with regular upgrades.
deploy.sh installs the site, swaps in the nginx config, validates it and reloads the server.
A record from your domain to your server IP, change
server_name _; to server_name yourdomain.com; in
nginx-site.conf, then re-run sudo bash deploy.sh.
apt install certbot python3-certbot-nginx -y followed by
certbot --nginx -d yourdomain.com. Certbot renews certificates automatically.
ufw allow OpenSSH && ufw allow 'Nginx Full' && ufw enable
so only SSH and web traffic are allowed in.
~/.ssh/authorized_keys, set
PasswordAuthentication no in /etc/ssh/sshd_config, then run
systemctl restart ssh.