Fork me on GitHub

nginx配置

server {
listen 80;
server_name 10.10.10.10;
location / {
index index.html;
root /data/cmdb/dist/;
try_files $uri $uri/ /index.html;
}

location ^~ /api/ {
proxy_set_header Host "10.10.10.10";
proxy_pass http://10.10.10.10:8000/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

  

posted @ 2022-11-07 13:40  神雕爱大侠  阅读(6)  评论(0编辑  收藏  举报