20 lines
591 B
Plaintext
20 lines
591 B
Plaintext
# 在宝塔现有站点 server {} 中合并 location;保留证书和域名配置。
|
||
root /www/wwwroot/dieya-app-portal/frontend/dist;
|
||
index index.html;
|
||
|
||
location ^~ /api/ {
|
||
proxy_pass http://127.0.0.1:8800;
|
||
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-Host $host;
|
||
proxy_connect_timeout 5s;
|
||
proxy_read_timeout 30s;
|
||
}
|
||
|
||
location / {
|
||
try_files $uri $uri/ /index.html;
|
||
}
|