server { # Listen on port 80 for standard HTTP traffic listen 80; # Specify the domain name this block should respond to server_name SERVER_NAME; location .well-known/acme-challenge/ { root /var/www/certbot; } location / { # Redirect all HTTP requests to HTTPS return 301 https://$host$request_uri; } }