## http://domain.com redirects to https://domain.com ## substitute bch-explorer.com with the domain you're actually going to use server { server_name bch-explorer.com; listen 80; #listen [::]:80 ipv6only=on; location / { return 301 https://bch-explorer.com$request_uri; } } ## Serves https://domain.com server { server_name bch-explorer.com; listen 443 ssl http2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_certificate /etc/letsencrypt/live/bch-explorer.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/bch-explorer.com/privkey.pem; location / { proxy_pass http://localhost:3002; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }