mirror of
https://github.com/daledavies/jump.git
synced 2026-02-25 07:40:46 +01:00
Issue #58: Add config option to disable IPv6 support in nginx
This commit is contained in:
@@ -76,6 +76,7 @@ You can use the following optional environment variables to configure/customise
|
||||
- `NOINDEX: 'true'` - Include a robots noindex meta tag in site header.
|
||||
- `CACHEBYPASS: 'true'` - Bypass all caches, useful for testing changes.
|
||||
- `WWWURL` - Useful if Jump is hosted in a sub-directory (e.g. "/startpage").
|
||||
- `DISABLEIPV6` - Disable IPV6 if required.
|
||||
|
||||
**NOTE:** The `OWMAPIKEY` and `LATLONG` config options must be defined together.
|
||||
|
||||
|
||||
@@ -68,16 +68,27 @@ if [ -z "${DEVELOPMENT-}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
echo >&2 "";
|
||||
echo >&2 "- All done! Starting nginx/php services now."
|
||||
echo >&2 "";
|
||||
echo >&2 "-------------------------------------------------------------"
|
||||
echo >&2 "";
|
||||
|
||||
else
|
||||
echo >&2 "";
|
||||
echo >&2 "- Setting correct ownership of xdebug dir"
|
||||
chown -R jumpapp:jumpapp /tmp/xdebug
|
||||
fi
|
||||
|
||||
DISABLEIPV6=$(echo "${DISABLEIPV6:-}" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [ "$DISABLEIPV6" == "true" ] || [ "$DISABLEIPV6" == "1" ]; then
|
||||
echo >&2 "";
|
||||
echo >&2 "- Disabling IPv6 in nginx config"
|
||||
sed -E -i 's/^([^#]*)listen \[::\]/\1#listen [::]/g' /etc/nginx/nginx.conf
|
||||
else
|
||||
sed -E -i 's/^(\s*)#listen \[::\]/\1listen [::]/g' /etc/nginx/nginx.conf
|
||||
fi
|
||||
|
||||
echo >&2 "";
|
||||
echo >&2 "- All done! Starting nginx/php services now."
|
||||
echo >&2 "";
|
||||
echo >&2 "-------------------------------------------------------------"
|
||||
echo >&2 "";
|
||||
|
||||
php-fpm8
|
||||
nginx -g 'daemon off;'
|
||||
|
||||
Reference in New Issue
Block a user