This commit is contained in:
2024-02-18 01:58:07 +01:00
parent 1389c5bdbc
commit 0f6a0a1ff0
10 changed files with 258 additions and 51 deletions

View File

@@ -0,0 +1,19 @@
server {
listen 80;
listen 443 ssl;
server_name WuppiMini.octt.eu.org WuppiMini.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
ssl_certificate /etc/letsencrypt/live/wuppimini.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wuppimini.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
error_log /var/log/nginx/Wuppi.error.log;
access_log /var/log/nginx/Wuppi.access.log;
location / {
proxy_http_version 1.1;
proxy_pass http://localhost:8135;
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";
}
}

View File

@@ -13,6 +13,10 @@ server {
# proxy_set_header Upgrade $http_upgrade;
#}
location / {
root /Main/Server/www/root-private;
}
location /phpmyadmin/ {
root /usr/share;
try_files $uri $uri/;

View File

@@ -0,0 +1,42 @@
server {
listen 80;
listen 443 ssl;
server_name doku.spacc.eu.org;
ssl_certificate /etc/letsencrypt/live/doku.spacc.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/doku.spacc.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
root /Main/Server/www/dokuwiki;
index doku.php;
# Loggers
error_log /var/log/nginx/Doku.error.log;
access_log /var/log/nginx/Doku.access.log;
#Remember to comment the below out when you're installing, and uncomment it when done.
#location ~ /(conf/|bin/|inc/|vendor/|install.php) { deny all; }
#Support for X-Accel-Redirect
location ~ ^/data/ { internal ; }
location ~ ^/lib.*\.(js|css|gif|png|ico|jpg|jpeg)$ {
expires 365d;
}
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
# rewrites "doku.php/" out of the URLs if you set the userwrite setting to .htaccess in dokuwiki config page
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1&$args last;
}
location ~ \.php$ {
try_files $uri $uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass php;
}
}

View File

@@ -39,12 +39,25 @@ server {
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location / {
try_files $uri $uri/ index.php;
sub_filter '</body>' '<script> function ForceUpdateFeeds(){ var Count = 0; Array.from(document.querySelectorAll(atob("KltpZF49ImZfIl0uaXRlbS5mZWVk"))).forEach(function(El){ Count++; fetch(location.origin + "/i/?c=feed&a=actualize&id=" + El.id.split("_")[1]); }); setTimeout(function(){ location.reload(); }, Count * 4000); }; </script></body>';
sub_filter '</body>' '<link rel="stylesheet" href="/user.css"/><script src="/Res/User/FreshRSS/Tweaks.js"></script></body>';
sub_filter '<a id="actualize"' '<a class="btn" href="#" title="Force update feeds" onclick="javascript:ForceUpdateFeeds();">Force update feeds</a><a id="actualize"';
sub_filter_once on;
}
location /Res/User/FreshRSS/ {
proxy_pass http://127.0.0.1/Res/User/FreshRSS/;
proxy_set_header Host hlb0.octt.eu.org;
}
location /user.css {
add_header Content-Type text/css;
return 200 ".flux .item > a, .flux .flux_header .item { white-space: normal !important; } .state_unread .category:not(.active)[data-unread='0'], .state_unread .feed:not(.active)[data-unread='0'] { display: revert; }";
}
#location / {
# try_files $uri $uri/ index.php;
# sub_filter '</body>' '<style> .flux .item > a { white-space: normal; } </style><script> function ForceUpdateFeeds(){ var Count = 0; Array.from(document.querySelectorAll(atob("KltpZF49ImZfIl0uaXRlbS5mZWVk"))).forEach(function(El){ Count++; fetch(location.origin + "/i/?c=feed&a=actualize&id=" + El.id.split("_")[1]); }); setTimeout(function(){ location.reload(); }, Count * 4000); }; </script></body>';
# sub_filter '<a id="actualize"' '<a class="btn" href="#" title="Force update feeds" onclick="javascript:ForceUpdateFeeds();">Force update feeds</a><a id="actualize"';
# sub_filter_once on;
#}
}

View File

@@ -0,0 +1,67 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name liminalgici.spacc.eu.org liminalgici.spaccsoj3trhzowrrblzb5m6hgkwu6syghnmhett7gvxbrz5zhsrs4ad.onion;
root /Main/Server/www/pixelfed_liminalgici/public; # path to repo/public
ssl_certificate /etc/letsencrypt/live/liminalgici.spacc.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/liminalgici.spacc.eu.org/privkey.pem;
ssl_protocols TLSv1.2;
ssl_ciphers EECDH+AESGCM:EECDH+CHACHA20:EECDH+AES;
ssl_prefer_server_ciphers on;
error_log /var/log/nginx/liminalgici.error.log warn;
access_log /var/log/nginx/liminalgici.access.log;
#add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
client_max_body_size 15M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_param HTTP_PROXY "";
}
location ~ /\.(?!well-known).* {
deny all;
}
}
server { # Redirect http to https
server_name liminalgici.spacc.eu.org; # change this to your fqdn
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}

View File

@@ -0,0 +1,13 @@
server {
listen 8083;
location / {
#proxy_http_version 1.1;
proxy_pass http://127.0.0.1:5283;
#proxy_set_header Host www.ecosia.org;
#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";
}
}

View File

@@ -62,19 +62,19 @@ server {
error_page 500 = /error.php?code=500;
access_log /var/log/nginx/root.access.log;
error_log /var/log/nginx/root.error.log;
sub_filter '</body>' '<script>top.postMessage(location.href.slice(location.origin.length), "https://hlb0it.blogspot.com")</script></body>';
#sub_filter_once off;
location / {
add_header Access-Control-Allow-Origin *;
root /Main/Server/www/root;
if ($request_uri ~ ^([^.\?]*[^/])$) {
return 301 $1/;
}
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)(/.*)$;
@@ -103,31 +103,45 @@ server {
sub_filter '</head>' '\n<meta name="viewport" content="width=device-width, initial-scale=1.0"/>\n<link rel="stylesheet" href="/Res/NginxIndex.css"/>\n</head>';
sub_filter '</h1>' '</h1>\n<input type="checkbox" id="ToggleMetadata" checked="checked"/><label for="ToggleMetadata"> Metadata</label>\n';
sub_filter '<h1>Index of /Drive/' '<h1>Index of <a href="/Drive/">/Drive</a>/';
sub_filter '</body>' '<script>top.postMessage(location.href.slice(location.origin.length), "https://hlb0it.blogspot.com")</script></body>';
sub_filter_once off;
}
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;
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;
sub_filter '<a href="/" id="title-a"' '<a style="/*position: absolute; margin-top: 0.25em;*/ word-break: keep-all;line-break: strict;" href="/Drive/">/Drive/</a><a style="/*margin-left: 3em;*/" href="/Drive/Telegram/" id="title-a"';
sub_filter '<link href="/' '<link href="/Drive/Telegram/';
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 '<meta property="og:image" content="/' '<meta property="og:image" content="https://hlb0.octt.eu.org/Drive/Telegram/';
sub_filter_once off;
}
#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;
# 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;
# sub_filter '<a href="/" id="title-a"' '<a style="/*position: absolute; margin-top: 0.25em;*/ word-break: keep-all;line-break: strict;" href="/Drive/">/Drive/</a><a style="/*margin-left: 3em;*/" href="/Drive/Telegram/" id="title-a"';
# sub_filter '<link href="/' '<link href="/Drive/Telegram/';
# 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 '<meta property="og:image" content="/' '<meta property="og:image" content="https://hlb0.octt.eu.org/Drive/Telegram/';
# sub_filter_once off;
#}
location /wwwroot/ {
rewrite ^/wwwroot/(.*)$ /$1 permanent;
}
}
#server {
# listen 80;
# listen 81;
# listen 443 ssl;
# server_name old;
# ssl_certificate /Main/Server/www/Temp/old/keys12/server.pem;
# ssl_certificate_key /Main/Server/www/Temp/old/keys12/private_unencrypted.pem;
# ssl_prefer_server_ciphers on;
# location / {
# root /Main/Server/www/Temp/old;
# }
#}