Web Hosting & VPS Tips

Unleash Your Server Potential with Expert Insights

Hosting provided by: Cloudways
Free to Try! Up to 40% Off!

Category: VPS Setup

Set up Nginx—a lightweight web server—on a Debian VPS for hosting—install with
apt update && apt install nginx
start with
systemctl start nginx
and enable on boot via
systemctl enable nginx
Open ports with
ufw allow 80 && ufw allow 443
then test with
curl http://localhost
—expect an Nginx welcome page Configure a site in /etc/nginx/sites-available/example com with
server { listen 80; server_name example.com; root /var/www/example.com; }
link it via
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
and reload with
nginx -s reload
On Linode this outperforms Apache for static content—add SSL with Certbot (apt install python3-certbot-nginx) for phpMyAdmin ensuring uptime with low memory use (~20MB)

Back to All Tips