Merge pull request #204 from openquery/index_files_to_serverlevel
index_files to be defined at server level if specified in resource::vhost
This commit is contained in:
commit
ee70673935
4 changed files with 8 additions and 2 deletions
|
@ -230,7 +230,7 @@ define nginx::resource::vhost (
|
|||
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'],
|
||||
}
|
||||
|
|
|
@ -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 %>;
|
||||
|
|
|
@ -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 %>";
|
||||
|
|
|
@ -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 %>;
|
||||
|
|
Loading…
Reference in a new issue