Blame view
modules/projects/templates/shared/nginx.conf.erb
827 Bytes
8088edd47 Bump modules |
1 |
upstream <%= server_name %> { |
7cf13dcb9 Ohai, some boxen:... |
2 3 4 5 6 7 8 |
server unix:<%= scope.lookupvar "boxen::config::socketdir" %>/<%= name %>; } server { access_log <%= scope.lookupvar "nginx::config::logdir" %>/<%= name %>.access.log main; listen 80; root <%= scope.lookupvar "boxen::config::srcdir" %>/<%= name %>/public; |
8088edd47 Bump modules |
9 |
server_name <%= server_name %>; |
7cf13dcb9 Ohai, some boxen:... |
10 11 12 13 14 15 |
client_max_body_size 50M; error_page 500 502 503 504 /50x.html; if ($host ~* "www") { |
8088edd47 Bump modules |
16 |
rewrite ^(.*)$ http://<%= server_name %>$1 permanent; |
7cf13dcb9 Ohai, some boxen:... |
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
break; } location = /50x.html { root html; } location / { if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { |
8088edd47 Bump modules |
34 |
proxy_pass http://<%= server_name %>; |
7cf13dcb9 Ohai, some boxen:... |
35 36 37 38 |
break; } } } |