nginx-get client IP address

There is an nginx proxy server between the server and the client. How does the upstream server obtain the real IP address of the client?

The nginx proxy server sets the header parameter of X-Forwarded-For. The proxy server obtains the client ip address through remote_addr and writes the ip address into the Client IP address.

 

Guess you like

Origin blog.csdn.net/h2728677716/article/details/132525882