mirror of
				https://gitlab.com/octospacc/Configs.git
				synced 2025-06-05 21:59:36 +02:00 
			
		
		
		
	[Server] Add nginx config; Update 2 backup scripts
This commit is contained in:
		| @@ -5,3 +5,4 @@ cd "$( dirname "$( realpath "$0" )" )" | |||||||
| cp -v /etc/diycron ./diycron | cp -v /etc/diycron ./diycron | ||||||
| cp -v /Server/Scripts/Backup/*.sh ./Scripts/Backup/ | cp -v /Server/Scripts/Backup/*.sh ./Scripts/Backup/ | ||||||
| cp -v /Server/Scripts/Backup/*.cfg ./Scripts/Backup/ | cp -v /Server/Scripts/Backup/*.cfg ./Scripts/Backup/ | ||||||
|  | # nginx was done manually | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ Item="FreshRSS-data" && cp "../${Item}/Latest.tar.xz" "./${Item}.tar.xz" && ccen | |||||||
| GitPush | GitPush | ||||||
| cd .. | cd .. | ||||||
|  |  | ||||||
| #GitPullPushPath "./Personal-Game-Saves" | GitPullPushPath "/Cloud/Repos/Personal-Game-Saves" | ||||||
|  |  | ||||||
| #CloudDir="/home/octo/Cloud" | #CloudDir="/home/octo/Cloud" | ||||||
| #cd "$CloudDir" | #cd "$CloudDir" | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								Server/nginx/sites-available/articles
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								Server/nginx/sites-available/articles
									
									
									
									
									
										Normal 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; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										31
									
								
								Server/nginx/sites-available/epic.octt.eu.org.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Server/nginx/sites-available/epic.octt.eu.org.conf
									
									
									
									
									
										Normal 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; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										16
									
								
								Server/nginx/sites-available/feeds
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Server/nginx/sites-available/feeds
									
									
									
									
									
										Normal 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"; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										44
									
								
								Server/nginx/sites-available/godo.octt.eu.org.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								Server/nginx/sites-available/godo.octt.eu.org.conf
									
									
									
									
									
										Normal 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"; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										16
									
								
								Server/nginx/sites-available/librex
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Server/nginx/sites-available/librex
									
									
									
									
									
										Normal 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"; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										30
									
								
								Server/nginx/sites-available/miss.octt.eu.org.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								Server/nginx/sites-available/miss.octt.eu.org.conf
									
									
									
									
									
										Normal 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; | ||||||
|  | 	} | ||||||
|  | } | ||||||
							
								
								
									
										16
									
								
								Server/nginx/sites-available/root
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								Server/nginx/sites-available/root
									
									
									
									
									
										Normal 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; | ||||||
|  | 	} | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user