瀏覽代碼

remove nginx -V check; add pillar example

tags/v0.55.0
Kent Shultz 10 年之前
父節點
當前提交
c2b896ea52
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. +1
    -1
      nginx/templates/config.jinja
  2. +4
    -0
      pillar.example

+ 1
- 1
nginx/templates/config.jinja 查看文件

@@ -13,7 +13,7 @@ events {
}

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', []) -%}
set_real_ip_from {{ ip }};
{% endfor -%}

+ 4
- 0
pillar.example 查看文件

@@ -3,6 +3,10 @@ nginx:
use_upstart: True
with_luajit: False
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:
headers-more:
source: http://github.com/agentzh/headers-more-nginx-module/tarball/v0.21

Loading…
取消
儲存