LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > When Proxy LiteSpeed, backend server only know it LiteSpeed Server IP

Reply
 
Thread Tools Display Modes
  #1  
Old 10-01-2012, 10:32 AM
khoaofgod khoaofgod is offline
Member
 
Join Date: Apr 2012
Posts: 10
Default 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 ?
Reply With Quote
  #2  
Old 10-01-2012, 11:53 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
http://www.litespeedtech.com/docs/we...pInProxyHeader
Reply With Quote
  #3  
Old 10-01-2012, 01:52 PM
khoaofgod khoaofgod is offline
Member
 
Join Date: Apr 2012
Posts: 10
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 ?
Reply With Quote
  #4  
Old 10-01-2012, 05:56 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:02 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.