check for a customized nginx configuration
webserver configuration as it now stands in the documentation foresees only help in a barebone install enviroment. It could be immensely useful for a docker compose setup to check if the nginx configuration file (default) is already available through mounted volumes; if so it skips the regeneration of it (that as it's now it overwrite every user edit to it)
This commit is contained in:
parent
8eadbd39a1
commit
94889ffc31
@ -120,6 +120,14 @@ fi
|
|||||||
if [ "$1" = 'zammad-nginx' ]; then
|
if [ "$1" = 'zammad-nginx' ]; then
|
||||||
check_zammad_ready
|
check_zammad_ready
|
||||||
|
|
||||||
|
# check if a customized nginx configuration is already available
|
||||||
|
CONF=/etc/nginx/sites-enabled/default
|
||||||
|
|
||||||
|
if [ -f "$CONF" ]; then
|
||||||
|
echo "starting nginx..."
|
||||||
|
|
||||||
|
exec /usr/sbin/nginx -g 'daemon off;'
|
||||||
|
else
|
||||||
# configure nginx
|
# configure nginx
|
||||||
sed -e "s#listen .*#listen ${NGINX_PORT};#g" \
|
sed -e "s#listen .*#listen ${NGINX_PORT};#g" \
|
||||||
-e "s#proxy_set_header X-Forwarded-Proto .*;#proxy_set_header X-Forwarded-Proto ${NGINX_SERVER_SCHEME};#g" \
|
-e "s#proxy_set_header X-Forwarded-Proto .*;#proxy_set_header X-Forwarded-Proto ${NGINX_SERVER_SCHEME};#g" \
|
||||||
|
Loading…
Reference in New Issue
Block a user