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.