Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: REMOTE_ADDR not working

by hsinclai (Deacon)
on Jan 30, 2011 at 16:31 UTC ( [id://885125]=note: print w/replies, xml ) Need Help??


in reply to REMOTE_ADDR not working

vit,
In ec2,
$ENV{'REMOTE_ADDR'}
works fine as intended on a single machine with a public Elastic IP assigned.. if you have instances behind ELB, then X_HTTP_FORWARDED_FOR might work but I am not 100% sure they set that header... they must or else server logs would be messed up too.

Replies are listed 'Best First'.
Re^2: REMOTE_ADDR not working
by vit (Friar) on Jan 30, 2011 at 19:43 UTC
    I know that ELB is used.
    /*
    sure they set that header... they must or else server logs would be messed up too.
    */
    Could you please clarify
      vit,

      If you know your server is behind ELB, then you should be in luck, need to read some docs:) maybe start here, but I'd like to note this has nothing to do with Perl!

      ELB does pass HTTP_X_FORWARDED_FOR, which should be a start.



Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://885125]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-03-29 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found