nginx轉發成功報400 bad request,服務端未收到請求
解決辦法:
upstream后面不要跟下划線
例如:
upstream auth_service{
server 30.4.164.151:10002;
}
location /auth_service {
proxy_pass http://auth_service;
}
修改為:
upstream auth-service{
server 30.4.164.151:10002;
}
location /auth_service {
proxy_pass http://auth-service;
}
