From 26d476e1bd401c31fbb2745b93d813d656a17c89 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sun, 13 May 2018 11:28:37 +0200 Subject: [PATCH] fix niginx conf port bug on upgrade script --- conf/nginx.conf | 4 ++-- scripts/upgrade | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 925f35c..c207177 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,6 +1,6 @@ location YNH_EXAMPLE_PATH/ { - rewrite ^YNH_EXAMPLE_PATH$ YNH_EXAMPLE_PATH/ permanent; - proxy_pass http://YNH_EXEMPLE_DOMAIN:YNH_EXAMPLE_PORT/; + rewrite ^YNH_PATH$ YNH_PATH/ permanent; + proxy_pass http://YNH_DOMAIN:YNH_PORT/; proxy_set_header Host $host; proxy_buffering off; } diff --git a/scripts/upgrade b/scripts/upgrade index c4effa9..3328b9a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,9 +51,10 @@ if [ "$path" = "" ]; then else sudo cp ../conf/nginx.conf $nginx_conf_path # Modify Nginx configuration file and copy it to Nginx conf directory - sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" $nginx_conf_path - sudo sed -i "s@YNH_EXAMPLE_PORT@$port@g" $nginx_conf_path - sudo sed -i "s@YNH_EXEMPLE_DOMAIN@$domain@g" $nginx_conf_path + port='9001' + sudo sed -i "s@YNH_PATH@$path@g" $nginx_conf_path + sudo sed -i "s@YNH_PORT@$port@g" $nginx_conf_path + sudo sed -i "s@YNH_DOMAIN@$domain@g" $nginx_conf_path fi # Reload Nginx and regenerate SSOwat conf