From d7d5ab18a3aa202ec5cf7ade8f927da5f60336ca Mon Sep 17 00:00:00 2001 From: ksurl Date: Wed, 12 May 2021 11:25:55 -0700 Subject: [PATCH 1/2] add homebridge subdomain conf --- homebridge.subdomain.conf.sample | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 homebridge.subdomain.conf.sample diff --git a/homebridge.subdomain.conf.sample b/homebridge.subdomain.conf.sample new file mode 100644 index 0000000..d6a619c --- /dev/null +++ b/homebridge.subdomain.conf.sample @@ -0,0 +1,41 @@ +## Version 2020/12/09 +# make sure that your dns has a cname set for homebridge and that your homebridge container is not using a base url + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name homebridge.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + # enable for ldap auth, fill in ldap details in ldap.conf + #include /config/nginx/ldap.conf; + + # enable for Authelia + #include /config/nginx/authelia-server.conf; + + location / { + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable the next two lines for ldap auth + #auth_request /auth; + #error_page 401 =200 /ldaplogin; + + # enable for Authelia + #include /config/nginx/authelia-location.conf; + + include /config/nginx/proxy.conf; + resolver 127.0.0.11 valid=30s; + set $upstream_app homebridge; # change to host IP if using host networking mode + set $upstream_port 8581; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + + } + +} From 5bcc40bb7450f3ad041c9ffbb38a5aeb102880a6 Mon Sep 17 00:00:00 2001 From: ksurl Date: Sat, 22 May 2021 08:58:29 -0700 Subject: [PATCH 2/2] update resolver --- homebridge.subdomain.conf.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homebridge.subdomain.conf.sample b/homebridge.subdomain.conf.sample index d6a619c..f1991ca 100644 --- a/homebridge.subdomain.conf.sample +++ b/homebridge.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2020/12/09 +## Version 2021/05/18 # make sure that your dns has a cname set for homebridge and that your homebridge container is not using a base url server { @@ -30,7 +30,7 @@ server { #include /config/nginx/authelia-location.conf; include /config/nginx/proxy.conf; - resolver 127.0.0.11 valid=30s; + include /config/nginx/resolver.conf; set $upstream_app homebridge; # change to host IP if using host networking mode set $upstream_port 8581; set $upstream_proto http;