module-nginx/templates/vhost/vhost_footer.erb

16 lines
463 B
Text
Raw Normal View History

<% if @include_files %><% @include_files.each do |file| -%>
include <%= file %>;
<% end -%><% end -%>
<% if @vhost_cfg_append -%><% vhost_cfg_append.each do |key,value| -%>
<%= key %> <%= value %>;
<% end -%>
<% end -%>
2011-06-07 00:25:04 +02:00
}
2013-07-17 20:42:57 +02:00
<% if @rewrite_www_to_non_www -%>
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;
}
<% end %>