mirror of
https://gitlab.com/octospacc/Configs.git
synced 2025-06-05 21:59:36 +02:00
Update all new server scripts
This commit is contained in:
@@ -10,7 +10,8 @@ events {
|
||||
|
||||
http {
|
||||
upstream php {
|
||||
server unix:/var/run/php/php7.4-fpm.sock;
|
||||
#server unix:/var/run/php/php7.4-fpm.sock;
|
||||
server unix:/var/run/php/php8.2-fpm.sock;
|
||||
}
|
||||
|
||||
##
|
||||
|
@@ -10,7 +10,7 @@ server {
|
||||
ssl_certificate /etc/letsencrypt/live/bbs.spacc.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/bbs.spacc.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
root /Server/www/SpaccBBS;
|
||||
root /Main/Server/www/SpaccBBS;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# Loggers
|
||||
@@ -93,10 +93,10 @@ server {
|
||||
#}
|
||||
location /wwwroot {
|
||||
if ($SpaccBbsMap = '1') {
|
||||
rewrite ^(.*) $scheme://hlb0.octt.eu.org/$request_uri last;
|
||||
rewrite ^(.*) $scheme://hlb0.octt.eu.org/$request_uri redirect;
|
||||
}
|
||||
if ($SpaccBbsMap = '2') {
|
||||
rewrite ^(.*) $scheme://octt.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion/$request_uri last;
|
||||
rewrite ^(.*) $scheme://octt.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion/$request_uri redirect;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
66
Server/Root/etc/nginx/sites-available/admin.conf
Normal file
66
Server/Root/etc/nginx/sites-available/admin.conf
Normal file
@@ -0,0 +1,66 @@
|
||||
map "" $LanLocalhost {
|
||||
default 192.168.1.125;
|
||||
}
|
||||
server {
|
||||
listen 81;
|
||||
#location /admin {
|
||||
# proxy_http_version 1.1;
|
||||
# proxy_pass http://10.0.3.106;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# proxy_set_header Upgrade $http_upgrade;
|
||||
#}
|
||||
|
||||
location /phpmyadmin/ {
|
||||
root /usr/share;
|
||||
try_files $uri $uri/;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
location /Scripts {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://$LanLocalhost:8066;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
}
|
||||
|
||||
location /websockify {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://$LanLocalhost:42300;
|
||||
#proxy_pass http://$LanLocalhost:22300;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
|
||||
location /desktop/fedora-xfce/ {
|
||||
#location /desktop/debian-xfce/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://$LanLocalhost:42300;
|
||||
#proxy_pass http://$LanLocalhost:22300;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
add_header 'Cross-Origin-Embedder-Policy' 'require-corp';
|
||||
add_header 'Cross-Origin-Opener-Policy' 'same-origin';
|
||||
add_header 'Cross-Origin-Resource-Policy' 'same-site';
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen 443 ssl;
|
||||
server_name private-analytics-not-for-public-use.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/private-analytics-not-for-public-use.octt.eu.org/fullchain.pem;
|
||||
|
@@ -5,6 +5,8 @@ server {
|
||||
ssl_certificate /etc/letsencrypt/live/articles.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/articles.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
access_log /var/log/nginx/articles.access.log;
|
||||
error_log /var/log/nginx/articles.error.log;
|
||||
location / {
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:8076;
|
||||
|
@@ -19,7 +19,7 @@ server {
|
||||
# sub_filter_once on;
|
||||
#}
|
||||
|
||||
root /Server/www/FreshRSS/p;
|
||||
root /Main/Server/www/FreshRSS/p;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# nginx log files
|
||||
|
@@ -25,30 +25,42 @@ server {
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 81;
|
||||
#listen 81;
|
||||
listen 443 ssl;
|
||||
server_name hlb0.octt.eu.org;
|
||||
ssl_certificate /etc/letsencrypt/live/hlb0.octt.eu.org/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/hlb0.octt.eu.org/privkey.pem;
|
||||
ssl_prefer_server_ciphers on;
|
||||
error_page 403 = /404.html;
|
||||
error_page 404 = /404.html;
|
||||
error_page 403 = /error.php?code=403;
|
||||
error_page 404 = /error.php?code=404;
|
||||
error_page 500 = /error.php?code=500;
|
||||
access_log /var/log/nginx/root.access.log;
|
||||
error_log /var/log/nginx/root.error.log;
|
||||
|
||||
location / {
|
||||
root /Server/www/root;
|
||||
root /Main/Server/www/root;
|
||||
if ($request_uri ~ ^([^.\?]*[^/])$) {
|
||||
return 301 $1/;
|
||||
}
|
||||
try_files $uri $uri/ $uri.html;
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
#try_files $uri =404;
|
||||
#try_files $uri $uri.html $uri/index.html index.html;
|
||||
autoindex off;
|
||||
#error_page 404 = /404.html;
|
||||
#rewrite ^/(\?.*)?$ index.html$1 permanent;
|
||||
|
||||
location ~ ^.+?\.php(/.*)?$ {
|
||||
fastcgi_pass php;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
set $path_info $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
|
||||
location /Drive/ {
|
||||
root /Server/www;
|
||||
root /Main/Server/www;
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
sub_filter '<a ' '</span></span>\n\n<span><a ';
|
||||
@@ -69,6 +81,8 @@ server {
|
||||
}
|
||||
|
||||
location /Drive/Telegram/ {
|
||||
access_log /var/log/nginx/TelegramIndex.access.log;
|
||||
error_log /var/log/nginx/TelegramIndex.error.log;
|
||||
rewrite ^/Drive/Telegram/(.*)$ /$1 break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://localhost:8095;
|
||||
@@ -82,6 +96,7 @@ server {
|
||||
sub_filter '<a href="/' '<a href="/Drive/Telegram/';
|
||||
sub_filter '<img src="/' '<img src="/Drive/Telegram/';
|
||||
sub_filter '<source src="/' '<source src="/Drive/Telegram/';
|
||||
sub_filter '<script src="/' '<script src="/Drive/Telegram/';
|
||||
sub_filter_once off;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user