Add Port and Proto variables

This commit is contained in:
Eric Nemchik 2020-02-17 17:05:10 -06:00
commit 0c24b78a0b
136 changed files with 856 additions and 260 deletions

View file

@ -1,9 +1,9 @@
#******** This config no longer works as intended. The web app loads, but no direct connection to server is made. *********
#******** PRs welcome for anyone who figures out how to fix it. Use the subdomain config in the meantime. *******
# plex does not require a base url setting
# if plex is running in bridge mode, the below config should work as is.
# for host mode, replace the line "proxy_pass http://$upstream_app:32400;" with "proxy_pass http://HOSTIP:32400;" HOSTIP being the IP address of plex
# if plex is running in bridge mode and the container is named "plex", the below config should work as is
# if not, replace the line "set $upstream_app plex;" with "set $upstream_app <containername>;"
# or "set $upstream_app <HOSTIP>;" for host mode, HOSTIP being the IP address of plex
# in plex server settings, under network, fill in "Custom server access URLs" with your domain (ie. "https://yourdomain.url:443/plex")
location /plex {
@ -21,8 +21,11 @@ location ^~ /plex/ {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app plex;
set $upstream_port 32400;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /plex(.*) $1 break;
proxy_pass http://$upstream_app:32400;
proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier;
proxy_set_header X-Plex-Device $http_x_plex_device;