Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes. Co-authored-by: Cursor <cursoragent@cursor.com>
66 lines
1.6 KiB
Plaintext
66 lines
1.6 KiB
Plaintext
# dyadmin.nomadro.cn -> Dymini Admin SPA + API proxy :8011
|
|
|
|
server
|
|
{
|
|
listen 80;
|
|
server_name dyadmin.nomadro.cn;
|
|
root /www/wwwroot/dyadmin.nomadro.cn;
|
|
|
|
location ~ ^/\.well-known/ {
|
|
allow all;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
access_log /www/wwwlogs/dyadmin.nomadro.cn.log;
|
|
error_log /www/wwwlogs/dyadmin.nomadro.cn.error.log;
|
|
}
|
|
|
|
server
|
|
{
|
|
listen 443 ssl http2;
|
|
server_name dyadmin.nomadro.cn;
|
|
root /www/wwwroot/dyadmin.nomadro.cn;
|
|
index index.html;
|
|
client_max_body_size 20m;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/dyadmin.nomadro.cn/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/dyadmin.nomadro.cn/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
ssl_prefer_server_ciphers on;
|
|
|
|
location ~ ^/\.well-known/ {
|
|
allow all;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://127.0.0.1:8011/api/;
|
|
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;
|
|
}
|
|
|
|
location /health {
|
|
proxy_pass http://127.0.0.1:8011/health;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location /assets/ {
|
|
try_files $uri =404;
|
|
expires 30d;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
access_log /www/wwwlogs/dyadmin.nomadro.cn.log;
|
|
error_log /www/wwwlogs/dyadmin.nomadro.cn.error.log;
|
|
}
|