f0a3317e8b
Route the panel through a secret subpath on port 80, remove the separate 8444 listener, and document common troubleshooting in docs. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
789 B
Plaintext
30 lines
789 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 $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 X-Forwarded-Prefix __PANEL_PREFIX__;
|
|
}
|
|
}
|