server { listen 80; listen [::]:80; server_name _; # Catch-all location /.well-known/acme-challenge/ { root /var/www/html; try_files $uri =404; } # Redirect ALL HTTP traffic to HTTPS (using the original host) location / { return 301 https://$host$request_uri; } }