dieya-app-portal/deploy/nginx.conf.example

20 lines
591 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 在宝塔现有站点 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;
}