mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-07-06 04:51:33 -07:00
update synclounge confs for v3+
This commit is contained in:
parent
76303dae7d
commit
4d31dcee2b
2 changed files with 22 additions and 69 deletions
|
@ -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
|
||||
|
||||
server {
|
||||
|
@ -12,8 +13,6 @@ server {
|
|||
include /config/nginx/ssl.conf;
|
||||
|
||||
client_max_body_size 0;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
# enable for ldap auth, fill in ldap details in ldap.conf
|
||||
#include /config/nginx/ldap.conf;
|
||||
|
@ -40,31 +39,14 @@ server {
|
|||
set $upstream_proto http;
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
}
|
||||
|
||||
###
|
||||
# Server
|
||||
###
|
||||
|
||||
# Change `/slserver` to what you set your server root to, if you change it.
|
||||
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;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_socket_keepalive on;
|
||||
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;
|
||||
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
|
||||
|
||||
}
|
||||
|
||||
# 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/;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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'
|
||||
# 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'
|
||||
# Use this with SyncLounge v3 or up
|
||||
#
|
||||
# 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 {
|
||||
|
@ -20,20 +19,11 @@
|
|||
# return 301 http://$host$request_uri;
|
||||
#}
|
||||
|
||||
###
|
||||
# Webapp
|
||||
###
|
||||
location /synclounge {
|
||||
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 {
|
||||
# # 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 {
|
||||
location /synclounge/ {
|
||||
# enable the next two lines for http auth
|
||||
#auth_basic "Restricted";
|
||||
#auth_basic_user_file /config/nginx/.htpasswd;
|
||||
|
@ -50,35 +40,16 @@ location /slweb {
|
|||
set $upstream_app synclounge;
|
||||
set $upstream_port 8088;
|
||||
set $upstream_proto http;
|
||||
|
||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||
|
||||
}
|
||||
rewrite /synclounge(.*) $1 break;
|
||||
|
||||
if ($http_referer ~* /slweb) {
|
||||
# Some requests like /config don't respect the base url (web root) setting
|
||||
rewrite ^/config /slweb/config redirect;
|
||||
# Probably a bug as well
|
||||
rewrite ^/socket.io/(.*) /slserver/socket.io/$1? redirect;
|
||||
}
|
||||
|
||||
###
|
||||
# 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;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
proxy_socket_keepalive on;
|
||||
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;
|
||||
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
|
||||
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue