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 '