From def291d210b32a2c1212da27514d9fdafec1f1bd Mon Sep 17 00:00:00 2001 From: Kent Shultz Date: Fri, 30 May 2014 11:02:46 -0700 Subject: [PATCH] check for realip module --- nginx/templates/config.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/templates/config.jinja b/nginx/templates/config.jinja index a8cc4f1..6ddc652 100644 --- a/nginx/templates/config.jinja +++ b/nginx/templates/config.jinja @@ -13,7 +13,7 @@ events { } http { - {% if 'set_real_ips' in nginx -%} + {% if 'set_real_ips' in nginx and salt['cmdmod.retcode']('nginx -V 2>&1 | grep http_realip_module') == 0 -%} {% for ip in nginx.get('set_real_ips', {}).get('ips', []) -%} set_real_ip_from {{ ip }}; {% endfor -%}