Change nginx.conf.erb to silence warnings

server_name without '@' was causing deprecation warnings.
This commit is contained in:
Paulo L F Casaretto 2013-07-03 12:46:29 -03:00
parent a7c15e40ab
commit 6529283e81

View file

@ -1,19 +1,19 @@
upstream <%= server_name %> { upstream <%= @server_name %> {
server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= name %>; server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= @name %>;
} }
server { 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; listen 80;
root <%= scope.lookupvar "boxen::config::srcdir" %>/<%= name %>/public; root <%= scope.lookupvar "boxen::config::srcdir" %>/<%= @name %>/public;
server_name <%= server_name %>; server_name <%= @server_name %>;
client_max_body_size 50M; client_max_body_size 50M;
error_page 500 502 503 504 /50x.html; error_page 500 502 503 504 /50x.html;
if ($host ~* "www") { if ($host ~* "www") {
rewrite ^(.*)$ http://<%= server_name %>$1 permanent; rewrite ^(.*)$ http://<%= @server_name %>$1 permanent;
break; break;
} }
@ -31,7 +31,7 @@ server {
} }
if (!-f $request_filename) { if (!-f $request_filename) {
proxy_pass http://<%= server_name %>; proxy_pass http://<%= @server_name %>;
break; break;
} }
} }