forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/smartgears-nginx-frontend/templates/generic-smartgears-virtualhost.j2: Manage the real_ip scenario when we are behind haproxy.
This commit is contained in:
parent
61a0f90bb4
commit
f4d3393235
|
@ -86,6 +86,14 @@ server {
|
|||
|
||||
client_max_body_size 100M;
|
||||
|
||||
{% if haproxy_ips is defined %}
|
||||
# We are behind haproxy
|
||||
{% for ip in haproxy_ips %}
|
||||
set_real_ip_from {{ ip }};
|
||||
{% endfor %}
|
||||
real_ip_header X-Forwarded-For;
|
||||
{% endif %}
|
||||
|
||||
include /etc/nginx/snippets/nginx-server-ssl.conf;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
|
|
Loading…
Reference in New Issue