forked from kalkih/forked-daapd-card
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daapd-proxy.sample.conf
46 lines (39 loc) · 1.27 KB
/
daapd-proxy.sample.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
# Sample reverse proxy to map between SSL and non-SSL transports
# Be fully aware of the security implications before using this
# Do not use it if you do not understand the security implications
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream appserver {
server 192.168.x.x:3688; # appserver:ws_port
}
server {
listen 3788 ssl; # client wss port
server_name xxx.duckdns.org;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
location / {
proxy_pass http://appserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
}
upstream guiserver {
server 192.168.x.x:3689; # gui server:port
}
server {
listen 3789 ssl; # client gui port
server_name xxx.duckdns.org;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
location / {
proxy_pass http://guiserver;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
}