18 lines
489 B
Nginx Configuration File
18 lines
489 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
client_max_body_size 200m;
|
|
|
|
location /api/ {
|
|
# 静态主机名:启动时经 /etc/resolv.conf 解析(Docker 127.0.0.11 / podman aardvark 均兼容)
|
|
proxy_pass http://api:8080; # 无 URI 部分:保留 /api 前缀转发
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
location / {
|
|
root /usr/share/nginx/html;
|
|
try_files $uri /index.html;
|
|
}
|
|
}
|