1. 修改nginx配置
將凡是前端帶/prod-api的請求全部轉發(fā)到指定路徑
location /prod-api/ {
proxy_pass http://106.xx.xxx.78:8080/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
2. 重啟nginx
nginx -s reload
《如何安裝nginx》