nginx 反向代理后如何获取客户端真是IP

server {
listen 80;
server_name aaa.com;

location / {
		proxy_pass http://localhost:8081;
		proxy_set_header Host $host:$server_port;
    	proxy_set_header   X-Real-IP          $remote_addr;
    	proxy_set_header   X-Forwarded-For    $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto   $scheme;
}

}

你可能感兴趣的:(nginx 反向代理后如何获取客户端真是IP)