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

This commit is contained in:
hogweed1
2026-11-02 19:31:56 +10:00
parent ce2fca1650
commit 7707399498

View File

@@ -440,50 +440,44 @@ upstream ceph_dashboard_backend {
server 192.168.0.71:8080 max_fails=3 fail_timeout=10s; server 192.168.0.71:8080 max_fails=3 fail_timeout=10s;
server 192.168.0.72:8080 max_fails=3 fail_timeout=10s; server 192.168.0.72:8080 max_fails=3 fail_timeout=10s;
server 192.168.0.73:8080 max_fails=3 fail_timeout=10s; server 192.168.0.73:8080 max_fails=3 fail_timeout=10s;
server 192.168.0.74:8080 max_fails=3 fail_timeout=10s;
server 192.168.0.75:8080 max_fails=3 fail_timeout=10s; server 192.168.0.75:8080 max_fails=3 fail_timeout=10s;
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; # server_name ceph-dashboard.guaranteedstruggle.host;
# Принудительный редирект с HTTP на безопасный HTTPS # # Принудительный редирект с HTTP на безопасный HTTPS
return 301 https://$host$request_uri; # return 301 https://$host$request_uri;
} # }
server { server {
listen 443 ssl; #listen 443 ssl;
listen 80;
server_name ceph-dashboard.guaranteedstruggle.host; # Имя для админки server_name ceph-dashboard.guaranteedstruggle.host; # Имя для админки
#http2 on; #http2 on;
ssl_certificate /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/cert.pem; # ssl_certificate /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/cert.pem;
ssl_certificate_key /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/key.pem; # ssl_certificate_key /etc/angie/ssl/ceph-dashboard.guaranteedstruggle.host/key.pem;
# Оптимальные параметры TLS # # Оптимальные параметры TLS
ssl_protocols TLSv1.2 TLSv1.3; # ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5; # ssl_ciphers HIGH:!aNULL:!MD5;
#===================================================================
# ПЕРВЫЙ РУБЕЖ: Если пользователь ввел домен без слэша,
# Angie САМ аккуратно редиректит его на домен СО СЛЭШЕМ внутри HTTPS.
#===================================================================
location = / {
return 301 https://ceph-dashboard.guaranteedstruggle.host;
}
location / { location / {
# Ставим замыкающий слэш на бэкенд — это КРИТИЧЕСКИ важно для CherryPy! # Перенаправляем клиента напрямую в апстрим.
proxy_pass http://ceph_dashboard_backend/; # Браузер получит от Ceph заголовок Location с IP-адресом активной ноды,
# Angie не будет его блокировать (proxy_redirect off), и браузер успешно переедет.
# Возвращаем дефолтный Host. CherryPy примет его, так как слэш уже на месте. proxy_pass http://ceph_dashboard_backend;
proxy_set_header Host $http_host; proxy_redirect off;
proxy_set_header Host $proxy_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 https;
# Полностью блокируем любые попытки бэкенда переписать заголовки proxy_buffering off;
proxy_redirect off; proxy_read_timeout 3600s;
} }
} }