forked from Team254/cheesy-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tunnel_nginx_config
40 lines (33 loc) · 994 Bytes
/
tunnel_nginx_config
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
server {
listen 443;
server_name cheesyarena.com;
ssl on;
ssl_certificate /etc/letsencrypt/live/cheesyarena.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/cheesyarena.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_prefer_server_ciphers on;
location / {
return 301 https://$host/display;
}
location /static/ {
proxy_pass http://localhost:9080/static/;
}
location /api/ {
proxy_pass http://localhost:9080/api/;
}
location ~ ^(/setup)?/display.*/websocket$ {
proxy_set_header Host $host;
proxy_pass http://localhost:9080$request_uri;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^(/setup)?/display {
proxy_pass http://localhost:9080$request_uri;
}
location ~ /.well-known {
root /usr/share/nginx/html;
}
}