Log visitors' IP addresses and protocol
By default, the target's web server log file only logs the load balancer's IP address.
Apache2
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
ServerAdmin [email protected]
DocumentRoot /var/www/html
LogFormat "%h %l %u %t %{X-Forwarded-For}i %{X-Forwarded-Proto}i \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" loadbalancer
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log loadbalancer
</VirtualHost>PHP
Last updated
Was this helpful?