From ed2caf9037815f58735b2d66e7fcc591893e00be Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sat, 13 Aug 2022 19:32:36 -0400 Subject: [PATCH] fix restore + nginx --- check_process | 2 +- conf/nginx.conf | 8 +++++++- scripts/restore | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/check_process b/check_process index 994ece8..ee0652e 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_sub_dir=0 setup_root=1 setup_nourl=0 - setup_private=1 + setup_private=0 setup_public=1 upgrade=1 upgrade=1 from_commit=CommitHash diff --git a/conf/nginx.conf b/conf/nginx.conf index 756e65b..abbdb62 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -10,5 +10,11 @@ location __PATH__/ { } location = / { - return 301 "/js/embed.min.js"; + if ($is_args = "") { + return 301 /js/embed.min.js; + } + proxy_pass http://localhost:__PORT__; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; } \ No newline at end of file diff --git a/scripts/restore b/scripts/restore index 2c6632f..e21b5bd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,7 @@ chown -R $app:www-data "$final_path" mkdir -p "/var/log/$app" chmod 750 "/var/log/$app" -chmod -R o-rwx "$final_path" +chmod -R o-rwx "/var/log/$app" ynh_exec_as $app touch "/var/log/$app/$app.log"