Skip to content

Commit

Permalink
Merge pull request #114 from helldorado/master
Browse files Browse the repository at this point in the history
Please reconsidere my pull request: Fix syntax "each" for ruby1.9 => each_line and add listen_port on rewrite_www_to_non_www
  • Loading branch information
James Fryman committed Aug 22, 2013
2 parents 304c129 + b40196f commit f98feea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions templates/vhost/vhost_footer.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<% if @include_files %><% @include_files.each do |file| -%>
<% if @include_files %><% @include_files.each_line do |file| -%>
include <%= file %>;
<% end -%><% end -%>
<% if @vhost_cfg_append -%><% vhost_cfg_append.each do |key,value| -%>
<% if @vhost_cfg_append -%><% vhost_cfg_append.each_line do |key,value| -%>
<%= key %> <%= value %>;
<% end -%>
<% end -%>
}
<% if @rewrite_www_to_non_www -%>
server {
listen <%= @listen_ip %>;
listen <%= @listen_ip %>:<%= @listen_port %>;
server_name www.<%= @name.gsub(/^www\./, '') %>;
rewrite ^ http://<%= @name.gsub(/^www\./, '') %>$uri permanent;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/vhost/vhost_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ server {
<% if defined? auth_basic_user_file -%>
auth_basic_user_file <%= @auth_basic_user_file %>;
<% end -%>
<% @proxy_set_header.each do |header| -%>
<% @proxy_set_header.each_line do |header| -%>
proxy_set_header <%= header %>;
<% end -%>
<% if @rewrite_to_https -%>
Expand Down
4 changes: 2 additions & 2 deletions templates/vhost/vhost_location_directory.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
root <%= @www_root %>;
<% end -%>
<% if @try_files -%>
try_files <% @try_files.each do |try| -%> <%= try %> <% end -%>;
try_files <% @try_files.each_line do |try| -%> <%= try %> <% end -%>;
<% end -%>
<% if @index_files -%>
index <% @index_files.each do |i| %> <%= i %><% end %>;
index <% @index_files.each_line do |i| %> <%= i %><% end %>;
<% end -%>
<% if defined? auth_basic -%>
auth_basic "<%= @auth_basic %>";
Expand Down
2 changes: 1 addition & 1 deletion templates/vhost/vhost_location_fastcgi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
fastcgi_split_path_info <%= @fastcgi_split_path %>;
<% end -%>
<% if @try_files -%>
try_files <% @try_files.each do |try| -%> <%= try %> <% end -%>;
try_files <% @try_files.each_line do |try| -%> <%= try %> <% end -%>;
<% end -%>
include <%= @fastcgi_params %>;
fastcgi_pass <%= @fastcgi %>;
Expand Down

0 comments on commit f98feea

Please sign in to comment.