Update ngxproxy

This commit is contained in:
Wonderfall 2016-05-31 16:40:46 +02:00
parent e2179d7efc
commit 3729916de9

View File

@ -28,7 +28,7 @@ read -p "Webroot (default is /): " WEBROOT
if [ "$WEBROOT" == "" ]; then if [ "$WEBROOT" == "" ]; then
WEBROOT="/" WEBROOT="/"
elif [ "$WEBROOT" != "/" ]; then elif [ "$WEBROOT" != "/" ]; then
echo "WARNING: Depending on the app, you might have to add a proxy header to get your custom webroot working." echo "WARNING: You might have to add a proxy header to get your custom webroot working."
while [[ "$CONFIGURE_WEBROOT" != "y" && "$CONFIGURE_WEBROOT" != "n" ]]; do while [[ "$CONFIGURE_WEBROOT" != "y" && "$CONFIGURE_WEBROOT" != "n" ]]; do
read -p "Is it required (by the app) to configure it? [y/n]: " CONFIGURE_WEBROOT read -p "Is it required (by the app) to configure it? [y/n]: " CONFIGURE_WEBROOT
@ -99,12 +99,10 @@ while [ "$MAX_BODY_SIZE" == "" ]; do
read -p "Max body size in MB (integer/n): " MAX_BODY_SIZE read -p "Max body size in MB (integer/n): " MAX_BODY_SIZE
done done
if ! [ "$MAX_BODY_SIZE" -eq "$MAX_BODY_SIZE" ] 2>/dev/null; then if ! [ "$MAX_BODY_SIZE" -eq "$MAX_BODY_SIZE" ] 2>/dev/null && [ "$MAX_BODY_SIZE" != "n" ]; then
if [ "$MAX_BODY_SIZE" != "n" ]; then
echo "ERROR: Incorrect value." echo "ERROR: Incorrect value."
exit 1 exit 1
fi fi
fi
if [ "$MAX_BODY_SIZE" != "n" ]; then if [ "$MAX_BODY_SIZE" != "n" ]; then
sed -i "s|#client_max_body_size <MAX_BODY_SIZE>|client_max_body_size $MAX_BODY_SIZE|g" /tmp/$NAME.conf sed -i "s|#client_max_body_size <MAX_BODY_SIZE>|client_max_body_size $MAX_BODY_SIZE|g" /tmp/$NAME.conf