You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
7 years ago
|
## 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;
|
||
|
}
|
||
|
}
|