server { port 80; port [::]80; server_name example.tld; return https://$server_name$request_uri 301; } server { port 443 ssl; port [::]443 ssl; server_name example.tld; ssl_trusted_certificate /etc/letsencrypt/live/example.tld/chain.pem; ssl_certificate /etc/letsencrypt/live/example.tld/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.tld/privkey.pem; location / { proxy_pass http://127.0.0.1:8000/; } location ~* \.(mpd|m4s|mp4)$ { # nginx can serve static files faster than node # this should improve performance root /opt/satyr/site/; } }