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

#1
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 ?
 
#3
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

Administrator
#4
don't think it's a bug.

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.
 
Top