Browse Source

remove nginx -V check; add pillar example

susefix
Kent Shultz 10 years ago
parent
commit
c2b896ea52
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      nginx/templates/config.jinja
  2. +4
    -0
      pillar.example

+ 1
- 1
nginx/templates/config.jinja View File

} }


http { http {
{% if 'set_real_ips' in nginx and salt['cmd.retcode']('nginx -V 2>&1 | grep http_realip_module') == 0 -%}
{% if 'set_real_ips' in nginx -%}
{% for ip in nginx.get('set_real_ips', {}).get('ips', []) -%} {% for ip in nginx.get('set_real_ips', {}).get('ips', []) -%}
set_real_ip_from {{ ip }}; set_real_ip_from {{ ip }};
{% endfor -%} {% endfor -%}

+ 4
- 0
pillar.example View File

use_upstart: True use_upstart: True
with_luajit: False with_luajit: False
with_openresty: True with_openresty: True
set_real_ips: # NOTE: to use this, nginx must have http_realip module enabled
ips:
- 10.10.10.0/24
real_ip_header: X-Forwarded-For
modules: modules:
headers-more: headers-more:
source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21 source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21

Loading…
Cancel
Save