task-181(静态资源部署与 Nginx History 托管): 确认后台 dist 发布目录约定
补充 deploy/release-structure.md 与 verify-dist.mjs,契约测试锁 conf。 TDD: task-181.test.ts 8 用例 RED→GREEN。
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# 仅作部署参考,实际 server/root/upstream 按环境调整。
|
||||
|
||||
location = /admin {
|
||||
return 302 /admin-vue/;
|
||||
}
|
||||
|
||||
location /admin-vue/assets/ {
|
||||
alias /var/www/admin-vue/assets/;
|
||||
try_files $uri =404;
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
location /admin-vue/ {
|
||||
alias /var/www/admin-vue/;
|
||||
try_files $uri $uri/ /admin-vue/index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://java_backend;
|
||||
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 Cookie $http_cookie;
|
||||
proxy_read_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
}
|
||||
Reference in New Issue
Block a user