Skip to content

Commit

Permalink
Merge pull request #255 from bionix/bugfix_autoindex
Browse files Browse the repository at this point in the history
Bugfix autoindex in nginx::resource::vhost
  • Loading branch information
James Fryman committed Feb 10, 2014
2 parents d2f7f14 + 8cc32d4 commit eadc36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# response code is equal to 200, 204, 301, 302 or 304.
# [*index_files*] - Default index files for NGINX to read when
# traversing a directory
# [*autoindex*] - Set it on 'on' to activate autoindex directory
# listing. Undef by default.
# [*autoindex*] - Set it on 'on' or 'off 'to activate/deactivate
# autoindex directory listing. Undef by default.
# [*proxy*] - Proxy server(s) for the root location to connect
# to. Accepts a single value, can be used in conjunction with
# nginx::resource::upstream
Expand Down Expand Up @@ -392,6 +392,7 @@
fastcgi_script => $fastcgi_script,
try_files => $try_files,
www_root => $www_root,
autoindex => $autoindex,
index_files => [],
location_custom_cfg => $location_custom_cfg,
notify => Class['nginx::service'],
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 @@ -17,8 +17,8 @@
<% if @try_files -%>
try_files<% @try_files.each do |try| -%> <%= try %><% end -%>;
<% end -%>
<% if @autoindex == 'on' -%>
autoindex on;
<% if defined? @autoindex -%>
autoindex <%= @autoindex %>;
<% end -%>
<% if @index_files.count > 0 -%>
index <% Array(@index_files).each do |i| %> <%= i %><% end %>;
Expand Down

0 comments on commit eadc36c

Please sign in to comment.