Skip to content

Commit

Permalink
Merge pull request #204 from openquery/index_files_to_serverlevel
Browse files Browse the repository at this point in the history
index_files to be defined at server level if specified in resource::vhost
  • Loading branch information
James Fryman committed Dec 19, 2013
2 parents 5fa3141 + f338f30 commit ee70673
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
fastcgi_script => $fastcgi_script,
try_files => $try_files,
www_root => $www_root,
index_files => $index_files,
index_files => undef,
location_custom_cfg => $location_custom_cfg,
notify => Class['nginx::service'],
}
Expand Down
3 changes: 3 additions & 0 deletions templates/vhost/vhost_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ server {
return 301 https://$host$request_uri;
}
<% end -%>
<% if @index_files -%>
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>

access_log <%= @access_log_real %>;
error_log <%= @error_log_real %>;
Expand Down
2 changes: 1 addition & 1 deletion templates/vhost/vhost_location_directory.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
autoindex on;
<% end -%>
<% if @index_files -%>
index <% @index_files.each do |i| %> <%= i %><% end %>;
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>
<% if defined? @auth_basic -%>
auth_basic "<%= @auth_basic %>";
Expand Down
3 changes: 3 additions & 0 deletions templates/vhost/vhost_ssl_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ server {
<% if defined? @auth_basic_user_file -%>
auth_basic_user_file "<%= @auth_basic_user_file %>";
<% end -%>
<% if @index_files -%>
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>

access_log <%= @ssl_access_log %>;
error_log <%= @ssl_error_log %>;
Expand Down

0 comments on commit ee70673

Please sign in to comment.