From 6529283e816c19e86dca9e4a9c6d244c75909e85 Mon Sep 17 00:00:00 2001 From: Paulo L F Casaretto Date: Wed, 3 Jul 2013 12:46:29 -0300 Subject: [PATCH] Change nginx.conf.erb to silence warnings server_name without '@' was causing deprecation warnings. --- modules/projects/templates/shared/nginx.conf.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/projects/templates/shared/nginx.conf.erb b/modules/projects/templates/shared/nginx.conf.erb index 9acd8f4..7b0252b 100644 --- a/modules/projects/templates/shared/nginx.conf.erb +++ b/modules/projects/templates/shared/nginx.conf.erb @@ -1,19 +1,19 @@ -upstream <%= server_name %> { - server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= name %>; +upstream <%= @server_name %> { + server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= @name %>; } server { - access_log <%= scope.lookupvar "nginx::config::logdir" %>/<%= name %>.access.log main; + access_log <%= scope.lookupvar "nginx::config::logdir" %>/<%= @name %>.access.log main; listen 80; - root <%= scope.lookupvar "boxen::config::srcdir" %>/<%= name %>/public; - server_name <%= server_name %>; + root <%= scope.lookupvar "boxen::config::srcdir" %>/<%= @name %>/public; + server_name <%= @server_name %>; client_max_body_size 50M; error_page 500 502 503 504 /50x.html; if ($host ~* "www") { - rewrite ^(.*)$ http://<%= server_name %>$1 permanent; + rewrite ^(.*)$ http://<%= @server_name %>$1 permanent; break; } @@ -31,7 +31,7 @@ server { } if (!-f $request_filename) { - proxy_pass http://<%= server_name %>; + proxy_pass http://<%= @server_name %>; break; } }