Merge pull request #343 from createdbypete/projects/nginx-wildcard
Add Nginx wildcard subdomain to projects template
This commit is contained in:
commit
8d7cdd2854
1 changed files with 1 additions and 6 deletions
|
@ -6,16 +6,11 @@ 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 %> *.<%= @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") {
|
|
||||||
rewrite ^(.*)$ http://<%= @server_name %>$1 permanent;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
root html;
|
root html;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue