nginx负载均衡后tomcat6 IP怎么获取不到?

问题:tomcat获取的IP一直是127.0.0.1,如果直接访问tomcat可以获取到IP地址,不知道配置哪里出问题了

nginx配置如下:

location / {
				   
		proxy_pass http://localhost:10010;
		proxy_set_header Host $http_host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header Connection Close;
		proxy_set_header X-Forwarded-For $remote_addr;
				   # include proxy.conf;
	}

 

tomcat配置:

 

 <Connector port="10010" maxHttpHeaderSize="8192" useBodyEncodingForURI="true" maxThreads="1000" enableLookups="false" redirectPort="8443" acceptCount="100" compression="on" compressionMinSize="2048" compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" /> 

你可能感兴趣的:(nginx负载均衡后tomcat6 IP怎么获取不到?)