mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-06-05 21:59:36 +02:00
Auto-Backup $'Mon Feb 10 2025 01:58:10 GMT+0100 (Central European Standard Time)'
This commit is contained in:
@ -17,39 +17,39 @@ server {
|
|||||||
error_log /var/log/nginx/SpaccBBS.error.log warn;
|
error_log /var/log/nginx/SpaccBBS.error.log warn;
|
||||||
access_log /var/log/nginx/SpaccBBS.access.log;
|
access_log /var/log/nginx/SpaccBBS.access.log;
|
||||||
|
|
||||||
location /old {
|
location /old {
|
||||||
# Handle /old/SOMETHING by rewriting to /old/app.php/SOMETHING
|
# Handle /old/SOMETHING by rewriting to /old/app.php/SOMETHING
|
||||||
try_files $uri $uri/ @rewriteapp;
|
try_files $uri $uri/ @rewriteapp;
|
||||||
|
|
||||||
# Deny access to internal phpbb files.
|
# Deny access to internal phpbb files.
|
||||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|install.bak|(?<!ext/)phpbb(?!\w+)|store|vendor) {
|
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|install.bak|(?<!ext/)phpbb(?!\w+)|store|vendor) {
|
||||||
deny all;
|
deny all;
|
||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /old/includes {
|
location /old/includes {
|
||||||
deny all;
|
deny all;
|
||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pass PHP scripts to the FastCGI server
|
# Pass PHP scripts to the FastCGI server
|
||||||
location ~ \.php(/|$) {
|
location ~ \.php(/|$) {
|
||||||
include fastcgi.conf;
|
include fastcgi.conf;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
|
||||||
# Set PATH_INFO and SCRIPT_FILENAME for PHP-FPM
|
# Set PATH_INFO and SCRIPT_FILENAME for PHP-FPM
|
||||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||||
|
|
||||||
fastcgi_pass php;
|
fastcgi_pass php;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rewrite handler for URLs like /old/SOMETHING
|
# Rewrite handler for URLs like /old/SOMETHING
|
||||||
location @rewriteapp {
|
location @rewriteapp {
|
||||||
rewrite ^/old/(.*)$ /old/app.php/$1 last;
|
rewrite ^/old/(.*)$ /old/app.php/$1 last;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Correctly pass scripts for installer
|
# Correctly pass scripts for installer
|
||||||
location /install/ {
|
location /install/ {
|
||||||
@ -99,6 +99,8 @@ location @rewriteapp {
|
|||||||
sub_filter '<head>' '<head><link rel="stylesheet" href="/new/assets/bbs-polyfill.css" />';
|
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 '<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;
|
sub_filter_once on;
|
||||||
|
#sub_filter '<meta property="og:image"' '<meta property="og:image:2"';
|
||||||
|
#sub_filter_once off;
|
||||||
|
|
||||||
location /new/new/assets/ {
|
location /new/new/assets/ {
|
||||||
proxy_pass http://localhost:4567/new/assets/;
|
proxy_pass http://localhost:4567/new/assets/;
|
||||||
|
Reference in New Issue
Block a user