server { listen 80; server_name {domain_name}; # Redirect to https location / { return 301 https://$host$request_uri; } # letsencrypt location /.well-known/acme-challenge/ { root /var/www/certbot; } }