From 126d1d5405ba00f090b51e3e4d50466f4313cfed Mon Sep 17 00:00:00 2001 From: octospacc Date: Fri, 3 Jan 2025 03:09:37 +0100 Subject: [PATCH] Auto-Backup $'Fri Jan 03 2025 02:33:10 GMT+0100 (Central European Standard Time)' --- .../Root/Main/Server/Scripts/BackupAll.zx.mjs | 1 + .../etc/nginx/sites-available/SpaccBBS.conf | 69 +++++++++++-------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs b/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs index c4ee6bf..9b89406 100755 --- a/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs +++ b/Server/Root/Main/Server/Scripts/BackupAll.zx.mjs @@ -223,6 +223,7 @@ Jobs.Cloud_SpaccBBS = async () => { Jobs.Cloud_SpaccBBSNodeBB = async () => { await FolderGoCopyForCloud('SpaccBBS-NodeBB', 'SpaccBBS-NodeBB-2024-Git'); + await $`rm -rf ./SpaccBBS-NodeBB/.git || true`; await $`cp ../SpaccBBS-NodeBB/Db.Latest.rdb.tar.xz ./Db.rdb.tar.xz`; await ccencryptNow('./Db.rdb.tar.xz', Secrets.BackupKey_Git_SpaccBBSNodeBB); await GitPullPush(); diff --git a/Server/Root/etc/nginx/sites-available/SpaccBBS.conf b/Server/Root/etc/nginx/sites-available/SpaccBBS.conf index fef693d..4edf3cd 100644 --- a/Server/Root/etc/nginx/sites-available/SpaccBBS.conf +++ b/Server/Root/etc/nginx/sites-available/SpaccBBS.conf @@ -17,36 +17,39 @@ server { error_log /var/log/nginx/SpaccBBS.error.log warn; access_log /var/log/nginx/SpaccBBS.access.log; - location /old { - try_files $uri $uri/ @rewriteapp; +location /old { + # Handle /old/SOMETHING by rewriting to /old/app.php/SOMETHING + try_files $uri $uri/ @rewriteapp; - # Pass the php scripts to FastCGI server specified in upstream declaration. - location ~ \.php(/|$) { - include fastcgi.conf; - fastcgi_split_path_info ^(.+\.php)(/.*)$; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; - fastcgi_param DOCUMENT_ROOT $realpath_root; - try_files $uri $uri/ /app.php$is_args$args; - fastcgi_pass php; - } + # Deny access to internal phpbb files. + location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|install.bak|(?' ''; + sub_filter '' ''; sub_filter '