-
Notifications
You must be signed in to change notification settings - Fork 7
/
nginx.conf
65 lines (50 loc) · 1.48 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
events {}
http {
map $host $vps_ip_address {
default "167.172.226.116"; # Change this by actual VPS' IP address
}
upstream websocket {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name $vps_ip_address;
return 301 https://$server_name$request_uri;
}
server {
listen 22926 ssl;
listen [::]:22926 ssl; # IPv6
server_name $vps_ip_address;
ssl_certificate /etc/letsencrypt/live/zombs2.tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zombs2.tk/privkey.pem;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
server {
listen 22927 ssl;
listen [::]:22927 ssl;
server_name $vps_ip_address;
ssl_certificate /etc/letsencrypt/live/zombs2.tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zombs2.tk/privkey.pem;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
}
server {
listen 22928 ssl;
listen [::]:22928 ssl;
server_name $vps_ip_address;
ssl_certificate /etc/letsencrypt/live/zombs2.tk/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/zombs2.tk/privkey.pem;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
location / {
proxy_pass http://127.0.0.1:8008;
}
}
}