Files
jiedian/server/nginx/acme.conf.template
T
dekun ba361eb5b8 fix: prevent [No Host] panel errors behind CDN or missing Host header
Force nginx to pass the domain as Host, add PANEL_DOMAIN fallback in Flask,
and document that the admin panel must be accessed over HTTP not HTTPS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-16 10:28:00 +08:00

31 lines
848 B
Plaintext

server {
listen 80;
listen [::]:80;
server_name __DOMAIN__;
root /var/www/acme;
location /.well-known/acme-challenge/ {
default_type "text/plain";
try_files $uri =404;
}
location / {
return 200 'ok';
add_header Content-Type text/plain;
}
# 管理面板(Nginx 反向代理至 Flask,无需额外暴露 8444)
location ^~ __PANEL_LOCATION__ {
__PANEL_ALLOW__
proxy_pass http://127.0.0.1:5080/;
proxy_http_version 1.1;
proxy_set_header Host __DOMAIN__;
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 X-Forwarded-Host __DOMAIN__;
proxy_set_header X-Forwarded-Prefix __PANEL_PREFIX__;
}
}