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