PinnedFeaturedPrivate
Nginx Setup for Debian
Install latest stable nginx for debian
Also see here
sudo su
cat <<EOF >> /etc/apt/sources.list.d/nginx.list
deb http://nginx.org/packages/debian/ buster nginx
deb-src http://nginx.org/packages/debian/ buster nginx
EOF
exit
curl -L https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
sudo apt update
sudo apt install nginxOptional 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 acme.sh
sudo su
wget -O - https://get.acme.sh | sh -s email=my@example.comsource ~/.bashrc
acme.sh --issue -d example.com --nginxOptional 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/certbotGenerate SSL
sudo certbot --nginx