Install nginx and publish a static site
A web server in a few minutes on Debian or Ubuntu.
- Installation:
sudo apt update sudo apt install nginx
- Public files go in /var/www/html: replace index.nginx-debian.html with your index.html.
- Check the configuration then reload:
sudo nginx -t sudo systemctl reload nginx
- Open the firewall if UFW is active:
sudo ufw allow 'Nginx Full'
- For free HTTPS, use Certbot (Let's Encrypt) once your domain name points to the server.
- Logs in case of trouble:
sudo tail -f /var/log/nginx/error.log