24 lines
602 B
Nginx Configuration File
24 lines
602 B
Nginx Configuration File
|
|
server {
|
|||
|
|
listen 8088;
|
|||
|
|
server_name _;
|
|||
|
|
|
|||
|
|
root /usr/share/nginx/html;
|
|||
|
|
index index.html;
|
|||
|
|
|
|||
|
|
# Vite SPA:刷新/直达路由回退到 index.html
|
|||
|
|
location / {
|
|||
|
|
try_files $uri $uri/ /index.html;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
# 如需在生产环境继续代理后端,可在此追加;示例:
|
|||
|
|
# location /webApi/ {
|
|||
|
|
# 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_pass http://8.155.172.147:9900/;
|
|||
|
|
# }
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|