nginx reverse proxy report 400 errors relations with the Host

Reprinted from: https: //blog.csdn.net/qq_22208737/article/details/80787396

If the back-end server is really anti-theft chain or the like provided to route or determining function according to the http request of the host field of the header, then

, if nginx reverse proxy host layer does not override the request header field will cause the request fails , reported 400 errors

solution:

LOCATION set

proxy_set_header Host $ http_host;

the header information back to the server

Guess you like

Origin www.cnblogs.com/silentdoer/p/12024684.html