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,5 +1,7 @@
# make sure that your dns has a cname set for plex, 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
# make sure that your dns has a cname set for 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://plex.yourdomain.url:443")
server {
@ -16,8 +18,6 @@ server {
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
@ -30,7 +30,9 @@ server {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app plex;
proxy_pass http://$upstream_app:32400;
set $upstream_port 32400;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";