diff --git a/grocy/rootfs/etc/cont-init.d/nginx.sh b/grocy/rootfs/etc/cont-init.d/nginx.sh index f13a2ef..2623101 100755 --- a/grocy/rootfs/etc/cont-init.d/nginx.sh +++ b/grocy/rootfs/etc/cont-init.d/nginx.sh @@ -4,7 +4,7 @@ # Configures NGINX for use with Grocy # ============================================================================== declare certfile -declare hassio_dns +declare dns_host declare ingress_entry declare ingress_interface declare keyfile @@ -32,5 +32,5 @@ sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf ingress_entry=$(bashio::addon.ingress_entry) sed -i "s#%%ingress_entry%%#${ingress_entry}#g" /etc/php7/php-fpm.d/ingress.conf -hassio_dns=$(bashio::dns.host) -sed -i "s/%%hassio_dns%%/${hassio_dns}/g" /etc/nginx/includes/resolver.conf +dns_host=$(bashio::dns.host) +sed -i "s/%%dns_host%%/${dns_host}/g" /etc/nginx/includes/resolver.conf diff --git a/grocy/rootfs/etc/nginx/includes/resolver.conf b/grocy/rootfs/etc/nginx/includes/resolver.conf index 65c431d..d864899 100644 --- a/grocy/rootfs/etc/nginx/includes/resolver.conf +++ b/grocy/rootfs/etc/nginx/includes/resolver.conf @@ -1 +1 @@ -resolver %%hassio_dns%%; +resolver %%dns_host%%; diff --git a/grocy/rootfs/etc/nginx/nginx.conf b/grocy/rootfs/etc/nginx/nginx.conf index 5b14ff5..9bad7a3 100644 --- a/grocy/rootfs/etc/nginx/nginx.conf +++ b/grocy/rootfs/etc/nginx/nginx.conf @@ -17,7 +17,7 @@ pcre_jit on; error_log /proc/1/fd/1 error; # Load allowed environment vars -env HASSIO_TOKEN; +env SUPERVISOR_TOKEN; env DISABLE_HA_AUTHENTICATION; # Load dynamic modules. @@ -31,11 +31,11 @@ events { http { include /etc/nginx/includes/mime.types; - log_format hassio '[$time_local] $status ' - '$http_x_forwarded_for($remote_addr) ' - '$request ($http_user_agent)'; + log_format homeassistant '[$time_local] $status ' + '$http_x_forwarded_for($remote_addr) ' + '$request ($http_user_agent)'; - access_log /proc/1/fd/1 hassio; + access_log /proc/1/fd/1 homeassistant; client_max_body_size 4G; default_type application/octet-stream; gzip on;