Adding a new subdomain hosted with nginx & letsencrypt

This is how I set up the subdomain for hosting this site ( I already had nginx and letsencrypt set up for the primary website and a few others, but it’s an uncommon-enough exercise for me that I’m writing the notes down here.

Getting started

server {
    listen 80;
    root /var/www/;
    index index.html index.htm;

Enabling HTTPS

sudo certbot --nginx -d