diff --git a/1.13.6-alpine/docker-entrypoint.sh b/1.13.6-alpine/docker-entrypoint.sh index e2c839e..427c417 100644 --- a/1.13.6-alpine/docker-entrypoint.sh +++ b/1.13.6-alpine/docker-entrypoint.sh @@ -8,6 +8,11 @@ export NGINX_HTTPSREDIRECT=${NGINX_HTTPSREDIRECT:-0} if [ $NGINX_HTTPSREDIRECT == 1 ]; then sed -e '/#httpsredirec/r /templates/httpsredirect.conf' -i /templates/default.conf; fi +# Include redirect file. +if [ -f $NGINX_URL_REWRITE_FILE ]; then + sed -i "s|#url_rewrite_file|include $NGINX_URL_REWRITE_FILE;|g" /templates/default.conf +fi + envsubst '${PHP_HOST} ${PHP_PORT} ${NGINX_DEFAULT_SERVER_NAME} ${NGINX_DEFAULT_ROOT}' < /templates/default.conf > /etc/nginx/conf.d/default.conf envsubst '${NGINX_PHP_READ_TIMEOUT}' < /templates/fastcgi.conf > /etc/nginx/fastcgi.conf exec nginx -g "daemon off;" diff --git a/1.13.6-alpine/templates/default.conf b/1.13.6-alpine/templates/default.conf index 6c40a35..b515a0b 100644 --- a/1.13.6-alpine/templates/default.conf +++ b/1.13.6-alpine/templates/default.conf @@ -18,6 +18,8 @@ server { include fastcgi.conf; #httpsredirect + #url_rewrite_file + location / { location ~* /system/files/ {