Aws ELB apache remote ip

It’s always a good pratice to log remote connections on your web server, if your apache web server is setted behind an AWS ELB, you can log remote ip by modifying apache main config file /etc/apache2/apache2.conf: we replace the %h by %{X-Forwarded-For}i, this header is supported by Amazon AWS.

For more info about supported HTTP headers on AWS ELB, visit this page