前端访问后台API前置标识为/api,在nginx增加api代理访问配置,配置如下:
location /api/ {
proxy_pass http://192.168.1.10:8888/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
前端访问后台API前置标识为/api,在nginx增加api代理访问配置,配置如下:
location /api/ {
proxy_pass http://192.168.1.10:8888/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}