Skip to content

Commit

Permalink
index_files to be defined at server level if specified in resource::v…
Browse files Browse the repository at this point in the history
…host

This partially avoids pitfall voxpupuli#2 (http://wiki.nginx.org/Pitfalls)
  • Loading branch information
Daniel Black committed Dec 18, 2013
1 parent b61c745 commit 520eb23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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 <% @index_files.each do |i| %> <%= i %><% end %>;
<% end -%>

access_log <%= @access_log_real %>;
error_log <%= @error_log_real %>;
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 <% @index_files.each do |i| %> <%= i %><% end %>;
<% end -%>

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

0 comments on commit 520eb23

Please sign in to comment.