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 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 acme.shπŸ”—

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
Category: Dev 
Published:  Β· Updated:   πŸ“ Edit this page


Have you written a response to this? Let me know the article or tweet URL (Article or tweet content needs to include the URL of this article, learn more about webmention here).

The response will be automatically collected by bot, and another bot will automatically post it here within 24 hours, I wrote an article about how to achieve this. You can also send your response via mail or Twitter DM