LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Install/Configuration (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=11)
-   -   When Proxy LiteSpeed, backend server only know it LiteSpeed Server IP (http://www.litespeedtech.com/support/forum/showthread.php?t=6288)

khoaofgod 10-01-2012 10:32 AM

When Proxy LiteSpeed, backend server only know it LiteSpeed Server IP
 
When Proxy LiteSpeed, backend server only know it LiteSpeed Server IP.

Client IP -> Server LiteSpeed (A) -> Backend Server(B)

Server B know the CLient IP as LiteSpeed A.

Do you know how to config for Backend Server B know the real IP if Client ?

mistwang 10-01-2012 11:53 AM

http://www.litespeedtech.com/docs/we...pInProxyHeader

khoaofgod 10-01-2012 01:52 PM

I used it already. However,

The $_SERVER['REMOTE_ADDR'] still is IP of Proxy. Not the Client IP.

http://proxy.easyjquery.com/

By Default [HTTP_X_FORWARDED_FOR] => 98.151.173.209, 83.167.226.125

FORWARDED_FOR show my IP .209 , but X_REAL_IP and REMOTE_ADDR still proxy .125

Is it bug ?

NiteWave 10-01-2012 05:56 PM

don't think it's a bug.

Quote:

When Proxy LiteSpeed, backend server only know it LiteSpeed Server IP
this is how proxy works --- not only litespeed, but all web server. the REMOTE_ADDR will show proxy's IP.

X_REAL_IP is not a standard header, it's defined and used by certain web server and web application, its purpose is to let the backend know the REMOTE_ADDR which the proxy see.

so in litespeed's case, the web app at the backend can parse the request header X_FORWARDED_FOR to know the "real IP" when reach the proxy.


All times are GMT -7. The time now is 04:42 AM.