From e5b5202460b1b0529eb550f45e2b667dc2ca7d56 Mon Sep 17 00:00:00 2001 From: Richard Bolkey Date: Mon, 24 Sep 2012 14:21:48 -0500 Subject: [PATCH] Fixing lookupvar/comparison operations in nginx.conf.erb template. A number of comparison operations were being performed against the parameter of the call to scope.lookupvar instead of against the result of the call. --- templates/conf.d/nginx.conf.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/conf.d/nginx.conf.erb b/templates/conf.d/nginx.conf.erb index 71a5aafea..0cc1fbf36 100644 --- a/templates/conf.d/nginx.conf.erb +++ b/templates/conf.d/nginx.conf.erb @@ -6,7 +6,7 @@ pid <%= scope.lookupvar('nginx::params::nx_pid')%>; events { worker_connections <%= scope.lookupvar('nginx::params::nx_worker_connections') %>; - <% if scope.lookupvar('nginx::params::nx_multi_accept' == 'on') %>multi_accept on;<% end %> + <% if scope.lookupvar('nginx::params::nx_multi_accept') == 'on' %>multi_accept on;<% end %> } http { @@ -17,17 +17,17 @@ http { sendfile <%= scope.lookupvar('nginx::params::nx_sendfile')%>; - <% if scope.lookupvar('nginx::params::nx_tcp_nopush' == 'on') %> + <% if scope.lookupvar('nginx::params::nx_tcp_nopush') == 'on' %> tcp_nopush on; <% end %> keepalive_timeout <%= scope.lookupvar('nginx::params::nx_keepalive_timeout')%>; tcp_nodelay <%= scope.lookupvar('nginx::params::nx_tcp_nodelay')%>; - <% if scope.lookupvar('nginx::params::nx_gzip' == 'on') %> + <% if scope.lookupvar('nginx::params::nx_gzip') == 'on' %> gzip on; gzip_disable "MSIE [1-6]\.(?!.*SV1)"; <% end %> include /etc/nginx/conf.d/*.conf; -} \ No newline at end of file +}