diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f7beb2..94c168c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.4.5 2023-11-09 + + ### Added + - Add NGINX_WEBROOT_SUFFIX to allow adding custom directories for the root command in nginx + + ## 6.4.4 2023-10-24 ### Changed diff --git a/install/etc/cont-init.d/10-nginx b/install/etc/cont-init.d/10-nginx index 5842d4b..f00ac33 100755 --- a/install/etc/cont-init.d/10-nginx +++ b/install/etc/cont-init.d/10-nginx @@ -28,9 +28,15 @@ if [ ! -f "/tmp/.container/container-restart" ] ; then if var_true "${NGINX_ENABLE_APPLICATION_CONFIGURATION}"; then nginx_configure_site_default if var_true "${NGINX_ENABLE_CREATE_SAMPLE_HTML}" ; then nginx_create_sample_html ; fi + if [ -n "${NGINX_WEBROOT_SUFFIX}" ]; then + _nginx_webroot=${NGINX_WEBROOT}${NGINX_WEBROOT_SUFFIX} + else + _nginx_webroot=${NGINX_WEBROOT} + fi + update_template "/etc/nginx/sites.available/*.conf" \ NGINX_LISTEN_PORT \ - NGINX_WEBROOT + _nginx_webroot if silent grep -q '' /etc/nginx/sites.available/*.conf ; then print_notice "Detected Legacy templates in /etc/nginx/sites.avaialable. Please change '' to {{NGINX_WEBROOT}}" silent sed -i "s||${NGINX_WEBROOT}|g" /etc/nginx/sites.available/*.conf