# Redirect all http traffic server { listen 80 default_server; listen [::]:80 default_server; location / { return 301 https://$host$request_uri; } # Note: for any http setup, redirect all acme challenges here for all # domains. Saves setting this up on multiple domains. location ^~ /.well-known/acme-challenge { alias /var/www/.well-known/acme-challenge; } }