Merge pull request #327 from pcasaretto/silence-warnings

Change nginx.conf.erb to silence warnings
This commit is contained in:
Adam Ochonicki 2013-07-03 08:55:37 -07:00
commit 74e896803c

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;
} }
} }