Skip to content

Commit

Permalink
Add directives: IndexOptions, IndexOrderDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
anyone-can-test authored and Aaron Hicks committed Nov 13, 2013
1 parent ca4f49b commit 02283f6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,27 @@ Lists the options for the given `<Directory>` block
}
```

######`index_options`

Styles the list

```puppet
apache::vhost { 'sample.example.net':
docroot => '/path/to/directory',
directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'] }],
}
```

######`index_order_default`
Sets the order of the list

```puppet
apache::vhost { 'sample.example.net':
docroot => '/path/to/directory',
directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date']}, ],
}
```

######`order`
Sets the order of processing `Allow` and `Deny` statements as per [Apache core documentation](http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order). An example:

Expand Down
2 changes: 2 additions & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
$servername = $name,
$serveraliases = [],
$options = ['Indexes','FollowSymLinks','MultiViews'],
$index_options = [],
$index_order_default = [],
$override = ['None'],
$directoryindex = '',
$vhost_name = '*',
Expand Down
6 changes: 6 additions & 0 deletions templates/vhost/_directories.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
Options <%= Array(directory['options']).join(' ') %>
<%- end -%>
<%- if provider == 'Directory' %>
<%- if directory['index_options'] -%>
IndexOptions <%= Array(directory['index_options']).join(' ') %>
<%- end -%>
<%- if directory['index_order_default'] -%>
IndexOrderDefault <%= Array(directory['index_order_default']).join(' ') %>
<%- end -%>
<%- if directory['allow_override'] -%>
AllowOverride <%= Array(directory['allow_override']).join(' ') %>
<%- elsif provider == 'Directory' -%>
Expand Down

0 comments on commit 02283f6

Please sign in to comment.