diff --git a/conf/nginx.conf b/conf/nginx.conf index c45c7dc..04c3de4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,11 +5,11 @@ location PATHTOCHANGE { rewrite ^ https://$server_name$request_uri? permanent; } - location ^~ PATHTOCHANGE/app/data { + location ^~ ROOTTOCHANGE/app/data { deny all; } - location ^~ PATHTOCHANGE/pgpback/keys { + location ^~ ROOTTOCHANGE/pgpback/keys { deny all; } diff --git a/scripts/install b/scripts/install index eca382b..d8a783c 100644 --- a/scripts/install +++ b/scripts/install @@ -125,10 +125,11 @@ nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf sudo cp ../conf/nginx.conf $nginx_conf_file if [ $path = "/" ]; then - sudo sed -i "s@PATHTOCHANGE@@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file else - sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@$path@g" $nginx_conf_file fi + sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file diff --git a/scripts/upgrade b/scripts/upgrade index cb9a215..fce3938 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,10 +83,11 @@ nginx_conf_file=/etc/nginx/conf.d/$domain.d/$app.conf sudo cp ../conf/nginx.conf $nginx_conf_file if [ $path = "/" ]; then - sudo sed -i "s@PATHTOCHANGE@@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@@g" $nginx_conf_file else - sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file + sudo sed -i "s@ROOTTOCHANGE@$path@g" $nginx_conf_file fi + sudo sed -i "s@PATHTOCHANGE@$path@g" $nginx_conf_file sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" $nginx_conf_file sudo sed -i "s@NAMETOCHANGE@$app@g" $nginx_conf_file sudo chown root: $nginx_conf_file