well,
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 0s

This commit is contained in:
hogweed1
2026-11-02 18:48:01 +10:00
parent 1c974d5f28
commit 837658edab

View File

@@ -441,23 +441,39 @@ upstream ceph_dashboard_backend {
server 192.168.0.89:8080 max_fails=3 fail_timeout=10s; server 192.168.0.89:8080 max_fails=3 fail_timeout=10s;
} }
server { server {
listen 80; listen 80;
server_name ceph-dashboard.guaranteedstruggle.host;
# Принудительный редирект с HTTP на безопасный HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name ceph-dashboard.guaranteedstruggle.host; # Имя для админки server_name ceph-dashboard.guaranteedstruggle.host; # Имя для админки
#http2 on;
ssl_certificate /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/cert.pem;
ssl_certificate_key /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/key.pem;
# Оптимальные параметры TLS
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / { location / {
proxy_pass http://ceph_dashboard_backend; proxy_pass http://ceph_dashboard_backend;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; #proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Proto https; # Сигнализируем Ceph про HTTPS
#=================================================================== #===================================================================
# МАГИЯ АНДЖИ: Перехватываем и переписываем любые редиректы бэкенда # МАГИЯ АНДЖИ: Перехватываем и переписываем любые редиректы бэкенда
#=================================================================== #===================================================================
# Если Ceph шлет редирект на любой IP с портом 8080, подменяем его на наш домен # Если Ceph шлет редирект на любой IP с портом 8080, подменяем его на наш домен
proxy_redirect ~^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:8080(.*)$ http://ceph-dashboard.guaranteedstruggle.host$1; proxy_redirect ~^http://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:8080(.*)$ https://ceph-dashboard.guaranteedstruggle.host$1;
proxy_redirect default; proxy_redirect default;
# Дашборд использует SSE (Server-Sent Events) для графиков, отключаем буфер # Дашборд использует SSE (Server-Sent Events) для графиков, отключаем буфер