Introduce an additional lighttpd config file to redirect the IP address and VIRTUAL_HOST to /admin/

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2023-01-15 23:48:34 +00:00
parent 2c04346411
commit 4c240a43d2
3 changed files with 13 additions and 3 deletions

View File

@@ -348,9 +348,10 @@ setup_lighttpd_bind() {
}
setup_web_php_env() {
if [ -z "$VIRTUAL_HOST" ] ; then
VIRTUAL_HOST="$FTLCONF_LOCAL_IPV4"
fi;
# if the environment variable VIRTUAL_HOST is not set, or is empty, then set it to the IP address of the container
if [ -z "${VIRTUAL_HOST}" ] || [ "${VIRTUAL_HOST}" == "" ]; then
VIRTUAL_HOST="${FTLCONF_LOCAL_IPV4}"
fi
for config_var in "VIRTUAL_HOST" "CORS_HOSTS" "PHP_ERROR_LOG" "PIHOLE_DOCKER_TAG" "TZ"; do
local beginning_of_line=" \"${config_var}\" => "