2020-06-02 14:52:24 +02:00
|
|
|
# Proxy stuff
|
|
|
|
# include /etc/nginx/snippets/nginx-proxy-params.conf;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Connection "";
|
2021-05-03 19:01:37 +02:00
|
|
|
{% if nginx_behind_haproxy_settings %}
|
2020-06-02 14:52:24 +02:00
|
|
|
{% if haproxy_ips is defined %}
|
|
|
|
proxy_set_header Host $http_host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
2020-06-20 00:50:42 +02:00
|
|
|
proxy_set_header X-Forwarded-Host {{ nginx_x_forwarded_host }};
|
2020-06-02 14:52:24 +02:00
|
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
|
|
{% else %}
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
{% if nginx_define_x_real_ip %}
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2021-05-03 19:01:37 +02:00
|
|
|
{% endif %}
|
2020-06-02 14:52:24 +02:00
|
|
|
{% if nginx_set_original_uri %}
|
|
|
|
proxy_set_header nginx-request-uri $request_uri;
|
|
|
|
{% endif %}
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
proxy_buffering {{ nginx_proxy_buffering }};
|
|
|
|
proxy_buffer_size {{ nginx_proxy_buffer_size }};
|
|
|
|
proxy_buffers {{ nginx_proxy_buffers }};
|
|
|
|
proxy_busy_buffers_size {{ nginx_proxy_busy_buffers_size }};
|
|
|
|
proxy_temp_file_write_size {{ nginx_proxy_temp_file_write_size }};
|
|
|
|
proxy_redirect {{ nginx_proxy_redirect }};
|
|
|
|
proxy_connect_timeout {{ nginx_proxy_connect_timeout }};
|
|
|
|
proxy_read_timeout {{ nginx_proxy_read_timeout }};
|
|
|
|
proxy_send_timeout {{ nginx_proxy_send_timeout }};
|
2021-02-22 11:49:48 +01:00
|
|
|
{% if ansible_distribution_version == 'Ubuntu' and ansible_distribution_major_version >= '16' %}
|
2020-11-24 17:29:07 +01:00
|
|
|
proxy_force_ranges {{ nginx_proxy_force_ranges }};
|
2021-02-22 11:42:25 +01:00
|
|
|
{% endif %}
|
|
|
|
|