2012-10-24 5 views
1

Nginx 설정을 리버스 프록시로 사용하고 Apache에 IP를 전달합니다. 어떤 이유로 mod_status는 클라이언트 IP를 인식하지 못하고 내 웹 사이트 IP를 클라이언트 IP로 표시합니다. 여기 mod_status의 클라이언트 IP를 mod_remoteip에서 가져올 수 없습니다.

내 오래된 아파치 2.2 mod_rpaf configuraton :

RPAFenable On 
RPAFproxy_ips 127.0.0.1 website IP server IP 
RPAFsethostname On 
RPAFheader X-Forwarded-For 

새로운 아파치 2.4 mod_remoteip 구성 :

RemoteIPHeader X-Forwarded-For 
RemoteIPTrustedProxy 127.0.0.1 website IP server IP 

잘못 mod_realip 구성에 대해인가, 아니면 아파치 2.4에 안 것이 그 것이다 이런 식으로?

또한

로그가 제대로 작동하지 않았지만 % A와 %의 시간에서 형식을 변경하여 수정되었습니다.

+0

는이에 대한 해결책을 찾았나요? mod_status 페이지를 살펴볼 때 실제 IP를 얻을 수 없습니다. – cherouvim

답변

1

추가 정보 : Nginx 프록시 구성 위치/{ proxy_pass http://www.domain.com:8080; 은 /usr/local/etc/nginx/proxy.conf를 포함합니다. }

proxy_set_header Host $host; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
관련 문제