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

Discussion in 'Install/Configuration' started by khoaofgod, Oct 1, 2012.

  1. khoaofgod

    khoaofgod New Member

    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 ?
  2. mistwang

    mistwang LiteSpeed Staff

  3. khoaofgod

    khoaofgod New Member

    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 ?
  4. NiteWave

    NiteWave Administrator

    don't think it's a bug.

    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.

Share This Page