Auto-Backup $'Fri Jan 03 2025 02:33:10 GMT+0100 (Central European Standard Time)'

This commit is contained in:
octospacc 2025-01-03 03:09:37 +01:00
parent 993f5bdb0b
commit 126d1d5405
2 changed files with 43 additions and 27 deletions

View File

@ -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();

View File

@ -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|(?<!ext/)phpbb(?!\w+)|store|vendor) {
deny all;
internal;
}
# Deny access to internal phpbb files.
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|install.bak|(?<!ext/)phpbb(?!\w+)|store|vendor) {
deny all;
# deny was ignored before 0.8.40 for connections over IPv6.
# Use internal directive to prohibit access on older versions.
internal;
}
location /old/includes {
deny all;
internal;
}
}
location /old/includes {
deny all;
internal;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
# Pass PHP scripts to the FastCGI server
location ~ \.php(/|$) {
include fastcgi.conf;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
# Set PATH_INFO and SCRIPT_FILENAME for PHP-FPM
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_pass php;
}
}
# Rewrite handler for URLs like /old/SOMETHING
location @rewriteapp {
rewrite ^/old/(.*)$ /old/app.php/$1 last;
}
# Correctly pass scripts for installer
location /install/ {
@ -68,6 +71,13 @@ server {
rewrite ^(.*)$ /install/app.php/$1 last;
}
#location ~ /app.php {
# #rewrite ^ $scheme://$host/old$request_uri redirect;
#}
#location ~ /old/app.php {
#
#}
location ~ /*\.php {
rewrite ^ $scheme://$host/old$request_uri redirect;
}
@ -86,6 +96,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#sub_filter '<head>' '<head><script src="/new/assets/core-js-bundle.min.js"></script>';
sub_filter '<head>' '<head><link rel="stylesheet" href="/new/assets/bbs-polyfill.css" />';
sub_filter '<noscript>' '<div class="SpaccBBS-Alpha-Header alert alert-warning">La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su <a href="/old/">/old/</a>.</div><noscript>';
sub_filter_once on;
@ -94,6 +105,10 @@ server {
}
}
location /user/ {
rewrite ^ $scheme://$host/new/$request_uri redirect;
}
location /.well-known/webfinger {
proxy_http_version 1.1;
proxy_pass http://localhost:4567/new/.well-known/webfinger;