Nginx Setup for Debian

Published: , Updated: , Reading Time: 1 min

Install latest stable nginx for debian

Also see here

sudo su
cat <<EOF >> /etc/apt/sources.list.d/nginx.list
deb buster nginx
deb-src buster nginx
curl -L | sudo apt-key add -
sudo apt update
sudo apt install nginx

Optional generate nginx conf online🔗

Generate a nginx conf online at here

If nginx conf need dhparam.pem, run :cd /etc/nginx sudo openssl dhparam -dsaparam -out dhparam.pem 4096

Optional install🔗

sudo su
wget -O - | sh -s
source ~/.bashrc --issue -d --nginx

Optional Install certbot🔗

Install snap🔗

sudo apt -y install snapd
sudo snap install core; sudo snap refresh core

sudo snap install --classic certbot
sudo snap install certbot-dns-cloudflare
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Generate SSL🔗

sudo certbot --nginx

📝 Edit this page🔗


Have you written a response to this? Let me know the URL, Or, you can send your response via mail