2013-05-13 10:57:58 +02:00
|
|
|
<% if @include_files %><% @include_files.each do |file| -%>
|
|
|
|
include <%= file %>;
|
|
|
|
<% end -%><% end -%>
|
2013-05-20 16:30:32 +02:00
|
|
|
<% if @vhost_cfg_append -%><% vhost_cfg_append.each do |key,value| -%>
|
|
|
|
<%= key %> <%= value %>;
|
2013-07-08 16:58:05 +02:00
|
|
|
<% end -%>
|
|
|
|
<% end -%>
|
2011-06-07 00:25:04 +02:00
|
|
|
}
|
2013-07-17 20:42:57 +02:00
|
|
|
<% if @rewrite_www_to_non_www -%>
|
2012-09-01 17:52:55 +02:00
|
|
|
server {
|
2013-07-17 20:42:57 +02:00
|
|
|
listen <%= @listen_ip %>;
|
|
|
|
server_name www.<%= @name.gsub(/^www\./, '') %>;
|
|
|
|
rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent;
|
2012-09-01 17:52:55 +02:00
|
|
|
}
|
|
|
|
<% end %>
|