Magento behind elb
Apache to use proxy
Apache will doesn't know who connects to it except the host ip address we set up nginx. To repair this, we need to install Apache's mod_rpaf. Use your favorite package manager to install libapache2-mod-rpaf:
sudo apt-get install libapache2-mod-rpaf
mod_rpaf requires the following directives inside a virtual host to work:
# Detect the ELB header and set the header magento expects
SetEnvIf X-Forwarded-Proto https HTTPS=on
Where RPAFproxy_ips can be multiple IP addresses, one of which is our Nginx proxy private IP address.