::: Zany's Homepage ::: Zany Wiki | »çÀÌÆ® ÅëÇÕ °Ë»ö
 
 
 

ÇÁ·Ï½Ã ȯ°æ¿¡¼­ client ip °¡Á®¿À±â - request.getRemoteAddr()

°Ô½ÃÆÇ
JAVA
ÀÛ¼ºÀÚ
helix
ÀÛ¼ºÀÏ
2017-01-23 11:32:40
ÀÐÀº¼ö
4647
ÆòÁ¡
   
Ç¥½Ã¿É¼Ç
HTML»ç¿ë | ÀÚµ¿BRűנ| °ø¹é¹®ÀÚÇã¿ë | °¡¿îµ¥Á¤·Ä | °íÁ¤Æø±Û²Ã | ÀÚµ¿URL¸µÅ© | ¸¶¿ì½º¼±ÅÃ
¡Ü X-Forwarded-For(XFF) Http Header.
¡Ü Apache Httpd 2.4 + WAS Á¶ÇÕ È¯°æ¿¡¼­ mod_jk °¡ ¾Æ´Ñ, mod_proxy ¸¦ »ç¿ëÇÏ¿© WAS ¿Í ¿¬°áÇÏ´Â °æ¿ì.
- WAS ¿¡¼­ request.getRemoveAddr() °á°ú°¡ ½ÇÁ¦ Ŭ¶óÀ̾ðÆ® IP °¡ ¾Æ´Ñ Apache Httpd ¼­¹öÀÇ IP ·Î ȹµæµÈ´Ù.
- À̸¦ ÇØ°áÇϱâ À§ÇØ ¾Æ·¡ 2°¡Áö ÀÛ¾÷À» ÇØÁÖ¾î¾ß ÇÑ´Ù.

¨ç Apache httpd 2.4 ¿¡¼­
XFF Header È°¼ºÈ­ (httpd.conf)
1) LoadModule remoteip_module modules/mod_remoteip.so ÁÖ¼® ÇØÁ¦
2) RemoteIPHeader X-Forwarded-For ¶óÀÎ Ãß°¡.
¨è WAS ÀÇ Java Äڵ忡¼­ Ŭ¶óÀ̾ðÆ® ¾ÆÀÌÇÇ È¹µæ½Ã,





The answer of JasonW is fine.
But since apache httpd 2.4.6 there is a alternative: mod_remoteip

All what you must do is:

1. May be you must install the "mod_remoteip" package
2. Enable the module:
LoadModule remoteip_module modules/mod_remoteip.so
3. Add the following to your apache httpd config.
Note that you must add this line not into the configuration of the proxy server.
You must add this to the configuration of the proxy target httpd server (the server behind the proxy):
RemoteIPHeader X-Forwarded-For
See at http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html for more informations and more options.


¡Ü Âü°í...
http://stackoverflow.com/questions/760283/apache-proxypass-how-to-preserve-original-ip-address
http://stackoverflow.com/questions/16558869/getting-ip-address-of-client
https://www.lesstif.com/pages/viewpage.action?pageId=20775886

 °Ô½ÃÆÇ ±Û ¸ñ·Ï
No Subject Poster Hits Posted
14122 helix 3749 2017-06-27 15:11:55
14068 helix 6661 2017-05-11 16:54:22
14064 helix 5439 2017-05-08 17:51:25
13942 helix 2030 2017-02-15 15:53:28
13923 helix 1546 2017-01-25 09:47:40
helix 4647 2017-01-23 11:32:40
13918 helix 3056 2017-01-17 17:42:33
13846 helix 5334 2016-11-07 11:05:56
13845 helix 1827 2016-11-07 10:56:49
13779 helix 16019 2016-10-11 10:42:48
13764 helix 2359 2016-10-07 15:42:35
ÄÚ¸àÆ®
ÀÛ¼ºÀÚ
                       
 
zany.kr
  Copyright ¨Ï 2002-2010 Zany's Programming Lab. All Rights Not Reserved.
temporary This Page loads on 0.031 Secs