Amazon EC2 web server shows an incorrect client IP in PHP -


i have 1 load balancer , 3 ec2 web servers linux , apache. whenever use $_server['remote_addr'] in php take website's visitor's ip addresses, shows me wrong ip address. when check ip in whois databases find reserved ip. guess ip of server in aws instead of client's ip. how can correct client's ip php in ec2 servers?

the ip local amazon ip because visitors not connect server directly.

normally load balancer forwards real client ip in $_server array under new key, in cases $_server['http_x_forwarded_for']


Comments

  1. Very informative blog. I found this information very helpful. I want more information about EC2 web server. Thanks for sharing.

    ReplyDelete

Post a Comment

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -