update synclounge confs for v3+

This commit is contained in:
aptalca 2020-10-28 12:25:56 -04:00
parent 76303dae7d
commit 4d31dcee2b
2 changed files with 22 additions and 69 deletions

View file

@ -1,4 +1,5 @@
# Use this if you are using the `latest` or `alpine` tags for the container, which contains both the web client and server applications. # Use this with SyncLounge v3 and up.
# Make sure that you do not have HSTS enabled, otherwise http access won't work
# Make sure that your dns has a cname set for synclounge # Make sure that your dns has a cname set for synclounge
server { server {
@ -12,8 +13,6 @@ server {
include /config/nginx/ssl.conf; include /config/nginx/ssl.conf;
client_max_body_size 0; client_max_body_size 0;
proxy_redirect off;
proxy_buffering off;
# enable for ldap auth, fill in ldap details in ldap.conf # enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf; #include /config/nginx/ldap.conf;
@ -40,31 +39,14 @@ server {
set $upstream_proto http; set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
} proxy_redirect off;
proxy_buffering off;
### proxy_socket_keepalive on;
# Server proxy_set_header X-Forwarded-Proto $scheme;
### proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
# Change `/slserver` to what you set your server root to, if you change it. proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
location /slserver {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app synclounge;
set $upstream_port 8089;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
} }
# Due to a bug in SyncLounge, some websockets calls don't respect the base url (server root) setting
# TODO: Update when fixed
location /socket.io {
resolver 127.0.0.11 valid=30s;
set $upstream_app synclounge;
set $upstream_port 8089;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port/slserver/socket.io/;
}
} }

View file

@ -1,5 +1,4 @@
# Use this if you are using the LSIO SyncLounge container which has the web base url set to '/slweb' and the server base url set to '/slserver' # Use this with SyncLounge v3 or up
# If you are using a different container or hosting natively make sure that you have set the web base url (webroot/WEB_ROOT setting) to '/slweb'
# #
# To allow non-secure connections (http), which is required by some Plex clients, modify the first block in site-confs/default to look something like this: # To allow non-secure connections (http), which is required by some Plex clients, modify the first block in site-confs/default to look something like this:
#server { #server {
@ -20,20 +19,11 @@
# return 301 http://$host$request_uri; # return 301 http://$host$request_uri;
#} #}
### location /synclounge {
# Webapp return 301 $scheme://$host/synclounge/;
### }
# Uncomment this to use a different base URL for the webapp. Change all instances of /synclounge to whatever you want. location /synclounge/ {
# location /synclounge {
# # Transparently redirect /synclounge to /slweb
# rewrite ^/synclounge/(.*)$ /slweb/$1 last;
# # Add trailing / after /synclounge if it doesn't exist
# rewrite ^/synclounge$ /synclounge/ permanent;
# return 404;
# }
location /slweb {
# enable the next two lines for http auth # enable the next two lines for http auth
#auth_basic "Restricted"; #auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd; #auth_basic_user_file /config/nginx/.htpasswd;
@ -50,35 +40,16 @@ location /slweb {
set $upstream_app synclounge; set $upstream_app synclounge;
set $upstream_port 8088; set $upstream_port 8088;
set $upstream_proto http; set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
} rewrite /synclounge(.*) $1 break;
if ($http_referer ~* /slweb) { proxy_redirect off;
# Some requests like /config don't respect the base url (web root) setting proxy_buffering off;
rewrite ^/config /slweb/config redirect; proxy_socket_keepalive on;
# Probably a bug as well proxy_set_header X-Forwarded-Proto $scheme;
rewrite ^/socket.io/(.*) /slserver/socket.io/$1? redirect; proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
} proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
###
# Server
###
# Proxy for the server
location /slserver {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app synclounge;
set $upstream_port 8089;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
} }
if ($http_referer ~* /slserver) {
# Some requests like socket.io don't respect the base url (server root) setting
rewrite ^/socket.io/(.*) /slserver/socket.io/$1? redirect;
}