[Server] Add nginx config; Update 2 backup scripts

This commit is contained in:
octospacc 2023-02-02 19:47:00 +01:00
parent 9b6e4b4c4c
commit f955b587e7
9 changed files with 175 additions and 1 deletions

View File

@ -5,3 +5,4 @@ cd "$( dirname "$( realpath "$0" )" )"
cp -v /etc/diycron ./diycron
cp -v /Server/Scripts/Backup/*.sh ./Scripts/Backup/
cp -v /Server/Scripts/Backup/*.cfg ./Scripts/Backup/
# nginx was done manually

View File

@ -21,7 +21,7 @@ Item="FreshRSS-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccen
GitPush
cd ..
#GitPullPushPath "./Personal-Game-Saves"
GitPullPushPath "/Cloud/Repos/Personal-Game-Saves"
#CloudDir="/home/octo/Cloud"
#cd "$CloudDir"

View File

@ -0,0 +1,20 @@
server {
listen 443 ssl;
server_name articles.octt.eu.org;
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;
location / {
proxy_http_version 1.1;
proxy_pass http://octt.ddns.net:8036;
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";
proxy_set_header Accept-Encoding ""; # Needed for sub_filter
sub_filter ' href="http://octt.ddns.net:8036/' ' href="https://articles.octt.eu.org/';
sub_filter ' src="http://octt.ddns.net:8036/' ' src="https://articles.octt.eu.org/';
sub_filter_once off;
}
}

View File

@ -0,0 +1,31 @@
#server {
# listen 80;
# listen [::]:80;
# server_name epic.octt.eu.org;
# index index.html;
# rewrite ^ https://$server_name$request_uri? permanent;
#}
server {
listen 443 ssl;
server_name epic.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/epic.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/epic.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass http://localhost:7156;
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";
#sub_filter '</head>' '\n<link rel="stylesheet" href="/Static/MissOctt.css">\n</head>';
#sub_filter_once on;
}
location /newsmirror {
root /Server/www/epic.octt.eu.org;
try_files $uri =404;
}
}

View File

@ -0,0 +1,16 @@
server {
listen 443 ssl;
server_name feeds.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/feeds.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/feeds.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass http://octt.ddns.net:8017;
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

@ -0,0 +1,44 @@
server {
listen 80;
server_name godo.octt.eu.org;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl;
server_name godo.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/godo.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/godo.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass http://localhost:6066;
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 = / {
rewrite ^ https://$server_name/@octt permanent;
}
}
server {
listen 443 ssl;
server_name pinafore-0.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/pinafore-0.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pinafore-0.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass https://pinafore.social;
proxy_set_header Host "pinafore.social";
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

@ -0,0 +1,16 @@
server {
listen 443 ssl;
server_name librex.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/librex.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/librex.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass https://librex.devol.it;
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

@ -0,0 +1,30 @@
server {
listen 443 ssl;
server_name miss.octt.eu.org;
ssl_certificate /etc/letsencrypt/live/miss.octt.eu.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/miss.octt.eu.org/privkey.pem;
ssl_prefer_server_ciphers on;
location / {
proxy_http_version 1.1;
proxy_pass http://localhost:3033;
#proxy_pass http://192.168.1.157:3033;
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";
sub_filter '</head>' '\n<link rel="stylesheet" href="/Static/MissOctt.css">\n</head>';
sub_filter '<noscript><p>JavaScriptを有効にしてください<br>Please turn on your JavaScript</p></noscript>' '\n<noscript><p>🇯🇵 JavaScriptを有効にしてください<br>🇬🇧 Please enable JavaScript in the browser<br>🇮🇹 Per favore abilita JavaScript nel browser</p></noscript>\n';
sub_filter_once on;
}
location /Static/ {
root /Server/www/;
autoindex off;
}
location /MisskeyStatic/ {
root /Server/www/;
try_files $uri $uri.html $uri/index.html index.html;
autoindex off;
}
}

View File

@ -0,0 +1,16 @@
server {
listen 80;
rewrite ^ https://$host$request_uri? permanent;
}
server {
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;
location / {
root /Server/www/root;
try_files $uri =404;
}
}