committed by
GitHub
1 changed files with 13 additions and 21 deletions
@ -1,34 +1,26 @@ |
|||||
## http://domain.com redirects to https://domain.com |
## http://domain.com redirects to https://domain.com |
||||
server { |
server { |
||||
server_name btc-explorer.com; |
server_name btc-explorer.com; |
||||
listen 80; |
listen 80; |
||||
#listen [::]:80 ipv6only=on; |
#listen [::]:80 ipv6only=on; |
||||
|
|
||||
include /etc/nginx/snippets/letsencrypt.conf; |
|
||||
|
|
||||
location / { |
location / { |
||||
return 301 https://btc-explorer.com$request_uri; |
return 301 https://btc-explorer.com$request_uri; |
||||
} |
} |
||||
} |
} |
||||
|
|
||||
|
|
||||
## Serves httpS://domain.com |
## Serves httpS://domain.com |
||||
server { |
server { |
||||
server_name btc-explorer.com; |
server_name btc-explorer.com; |
||||
listen 443 ssl http2; |
listen 443 ssl http2; |
||||
#listen [::]:443 ssl http2 ipv6only=on; |
#listen [::]:443 ssl http2 ipv6only=on; |
||||
|
|
||||
ssl_certificate /etc/letsencrypt/live/btc-explorer.com/fullchain.pem; |
location / { |
||||
ssl_certificate_key /etc/letsencrypt/live/btc-explorer.com/privkey.pem; |
proxy_pass http://localhost:3002; |
||||
ssl_trusted_certificate /etc/letsencrypt/live/btc-explorer.com/fullchain.pem; |
proxy_http_version 1.1; |
||||
include /etc/nginx/snippets/ssl.conf; |
proxy_set_header Upgrade $http_upgrade; |
||||
|
proxy_set_header Connection 'upgrade'; |
||||
location / { |
proxy_set_header Host $host; |
||||
proxy_pass http://localhost:3002; |
proxy_cache_bypass $http_upgrade; |
||||
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