Dan Janosik
7 years ago
committed by
GitHub
1 changed files with 34 additions and 0 deletions
@ -0,0 +1,34 @@ |
|||
## http://domain.com redirects to https://domain.com |
|||
server { |
|||
server_name btc-explorer.com; |
|||
listen 80; |
|||
#listen [::]:80 ipv6only=on; |
|||
|
|||
include /etc/nginx/snippets/letsencrypt.conf; |
|||
|
|||
location / { |
|||
return 301 https://btc-explorer.com$request_uri; |
|||
} |
|||
} |
|||
|
|||
|
|||
## Serves httpS://domain.com |
|||
server { |
|||
server_name btc-explorer.com; |
|||
listen 443 ssl http2; |
|||
#listen [::]:443 ssl http2 ipv6only=on; |
|||
|
|||
ssl_certificate /etc/letsencrypt/live/btc-explorer.com/fullchain.pem; |
|||
ssl_certificate_key /etc/letsencrypt/live/btc-explorer.com/privkey.pem; |
|||
ssl_trusted_certificate /etc/letsencrypt/live/btc-explorer.com/fullchain.pem; |
|||
include /etc/nginx/snippets/ssl.conf; |
|||
|
|||
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; |
|||
} |
|||
} |
Loading…
Reference in new issue