nginx反向代理

This commit is contained in:
qiaoxinjiu
2026-04-15 16:15:45 +08:00
parent ac08ff3740
commit 79cdaa9917

View File

@@ -5,6 +5,14 @@ server {
root /usr/share/nginx/html;
index index.html;
location /it/api/ {
proxy_pass http://172.18.0.1:5010;
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;
}
location / {
try_files $uri $uri/ /index.html;
}