Init
This commit is contained in:
commit
39073d8f3a
15 changed files with 297 additions and 0 deletions
39
snapcast/data/nginx-site.gtpl
Normal file
39
snapcast/data/nginx-site.gtpl
Normal file
|
@ -0,0 +1,39 @@
|
|||
server {
|
||||
listen {{ .interface }}:8099 default_server;
|
||||
|
||||
allow 172.30.32.2;
|
||||
deny all;
|
||||
|
||||
absolute_redirect off;
|
||||
|
||||
location /mobile/ {
|
||||
if ($request_uri ~ ^([^.\?]*[^/])$) {
|
||||
return 301 {{ .entry }}$1/;
|
||||
}
|
||||
|
||||
proxy_pass http://localhost:6680;
|
||||
|
||||
sub_filter_once off;
|
||||
sub_filter_types *;
|
||||
sub_filter '/mobile/' '{{ .entry }}/mobile/';
|
||||
sub_filter '/mopidy/ws' '{{ .entry }}/mopidy/ws';
|
||||
}
|
||||
location /mopidy/ws {
|
||||
proxy_pass http://localhost:6680;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:1780;
|
||||
}
|
||||
location ~ ^/(jsonrpc|stream) {
|
||||
proxy_pass http://localhost:1780;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue