Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please reconsidere my pull request: Fix syntax "each" for ruby1.9 => each_line and add listen_port on rewrite_www_to_non_www #114

Merged
merged 15 commits into from
Aug 22, 2013
Merged
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