Commit 5f2f8f49 authored by isaak yansane-sisk's avatar isaak yansane-sisk

use X-FORWARDED-FOR header so client's actual IP is visible instead of haproxy's

parent b5f8ce47
......@@ -58,7 +58,7 @@ SSLCARevocationFile {{ parameter_dict['crl'] }}
ErrorLog "{{ parameter_dict['error-log'] }}"
# Default apache log format with request time in microsecond at the end
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D" combined
CustomLog "{{ parameter_dict['access-log'] }}" combined
<Directory />
......
......@@ -370,12 +370,12 @@ md5sum = ec9321514674c084e509ca070763b4a1
[template-apache-conf]
<= download-base
filename = apache.conf.in
md5sum = cbe53c1879db9601a521e3ce1d546116
md5sum = 30e5560c216042bc965959a78d43f7c4
[template-haproxy-cfg]
<= download-base
filename = haproxy.cfg.in
md5sum = 3defd473e2cea17ae36bba7752494858
md5sum = 5f85c35ebf3d08d408df0ce9935c5424
[bt5-repository]
# Format:
......
......@@ -35,6 +35,9 @@ defaults
# is configured with maxconn to 1, without this option browsers are unable
# to render a page
option forceclose
# Use "option forwardfor" so that client's actual IP is used rather than the IP
# of the load balancer
option forwardfor
{% for name, (port, backend_list) in sorted(parameter_dict['backend-dict'].iteritems()) -%}
listen {{ name }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment