|
428 | 428 | # krb_method_negotiate => 'on', |
429 | 429 | # krb_auth_realms => ['EXAMPLE.ORG'], |
430 | 430 | # krb_local_user_mapping => 'on', |
431 | | -# directories => { |
432 | | -# path => '/var/www/html', |
433 | | -# auth_name => 'Kerberos Login', |
434 | | -# auth_type => 'Kerberos', |
435 | | -# auth_require => 'valid-user', |
436 | | -# }, |
| 431 | +# directories => [ |
| 432 | +# { |
| 433 | +# path => '/var/www/html', |
| 434 | +# auth_name => 'Kerberos Login', |
| 435 | +# auth_type => 'Kerberos', |
| 436 | +# auth_require => 'valid-user', |
| 437 | +# }, |
| 438 | +# ], |
437 | 439 | # } |
438 | 440 | # ``` |
439 | 441 | # |
|
1163 | 1165 | # suphp_addhandler => 'x-httpd-php', |
1164 | 1166 | # suphp_engine => 'on', |
1165 | 1167 | # suphp_configpath => '/etc/php5/apache2', |
1166 | | -# directories => { path => '/home/appuser/myphpapp', |
1167 | | -# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
1168 | | -# } |
| 1168 | +# directories => [ |
| 1169 | +# { |
| 1170 | +# 'path' => '/home/appuser/myphpapp', |
| 1171 | +# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
| 1172 | +# }, |
| 1173 | +# ], |
1169 | 1174 | # } |
1170 | 1175 | # ``` |
1171 | 1176 | # |
|
1180 | 1185 | # suphp_addhandler => 'x-httpd-php', |
1181 | 1186 | # suphp_engine => 'on', |
1182 | 1187 | # suphp_configpath => '/etc/php5/apache2', |
1183 | | -# directories => { path => '/home/appuser/myphpapp', |
1184 | | -# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
1185 | | -# } |
| 1188 | +# directories => [ |
| 1189 | +# { |
| 1190 | +# 'path' => '/home/appuser/myphpapp', |
| 1191 | +# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
| 1192 | +# }, |
| 1193 | +# ], |
1186 | 1194 | # } |
1187 | 1195 | # ``` |
1188 | 1196 | # |
|
1197 | 1205 | # suphp_addhandler => 'x-httpd-php', |
1198 | 1206 | # suphp_engine => 'on', |
1199 | 1207 | # suphp_configpath => '/etc/php5/apache2', |
1200 | | -# directories => { path => '/home/appuser/myphpapp', |
1201 | | -# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
1202 | | -# } |
| 1208 | +# directories => [ |
| 1209 | +# { |
| 1210 | +# 'path' => '/home/appuser/myphpapp', |
| 1211 | +# 'suphp' => { user => 'myappuser', group => 'myappgroup' }, |
| 1212 | +# }, |
| 1213 | +# ], |
1203 | 1214 | # } |
1204 | 1215 | # ``` |
1205 | 1216 | # |
|
1407 | 1418 | # ``` puppet |
1408 | 1419 | # apache::vhost { 'sample.example.net': |
1409 | 1420 | # docroot => '/path/to/directory', |
1410 | | -# directories => { |
1411 | | -# path => '/path/to/directory', |
1412 | | -# headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', |
1413 | | -# }, |
| 1421 | +# directories => [ |
| 1422 | +# { |
| 1423 | +# path => '/path/to/directory', |
| 1424 | +# headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', |
| 1425 | +# }, |
| 1426 | +# ], |
1414 | 1427 | # } |
1415 | 1428 | # ``` |
1416 | 1429 | # |
|
1457 | 1470 | # @param gssapi |
1458 | 1471 | # Specfies mod_auth_gssapi parameters for particular directories in a virtual host directory |
1459 | 1472 | # ```puppet |
1460 | | -# include apache::mod::auth_gssapi |
1461 | 1473 | # apache::vhost { 'sample.example.net': |
1462 | 1474 | # docroot => '/path/to/directory', |
1463 | 1475 | # directories => [ |
|
1804 | 1816 | Boolean $use_servername_for_filenames = false, |
1805 | 1817 | Boolean $use_port_for_filenames = false, |
1806 | 1818 | Array[Hash[String[1], String[1]]] $aliases = [], |
1807 | | - Optional[Variant[Hash, Array[Variant[Array,Hash]]]] $directories = undef, |
| 1819 | + Optional[Array[Hash]] $directories = undef, |
1808 | 1820 | Boolean $error_log = true, |
1809 | 1821 | Optional[String] $error_log_file = undef, |
1810 | 1822 | Optional[String] $error_log_pipe = undef, |
|
2353 | 2365 | # - $apache_version |
2354 | 2366 | # - $suphp_engine |
2355 | 2367 | # - $shibboleth_enabled |
2356 | | - if $_directories and ! empty($_directories) { |
| 2368 | + if $_directories and ! empty($_directories) and $ensure == 'present' { |
| 2369 | + $_directories.each |Hash $directory| { |
| 2370 | + if 'auth_basic_authoritative' in $directory or 'auth_basic_fake' in $directory or 'auth_basic_provider' in $directory { |
| 2371 | + include apache::mod::auth_basic |
| 2372 | + } |
| 2373 | + |
| 2374 | + if 'auth_user_file' in $directory { |
| 2375 | + include apache::mod::authn_file |
| 2376 | + } |
| 2377 | + |
| 2378 | + if 'auth_group_file' in $directory { |
| 2379 | + include apache::mod::authz_groupfile |
| 2380 | + } |
| 2381 | + |
| 2382 | + if 'gssapi' in $directory { |
| 2383 | + include apache::mod::auth_gssapi |
| 2384 | + } |
| 2385 | + |
| 2386 | + if $directory['provider'] and $directory['provider'] =~ 'location' and ('proxy_pass' in $directory or 'proxy_pass_match' in $directory) { |
| 2387 | + include apache::mod::proxy_http |
| 2388 | + } |
| 2389 | + |
| 2390 | + if 'request_headers' in $directory { |
| 2391 | + include apache::mod::headers |
| 2392 | + } |
| 2393 | + |
| 2394 | + if 'rewrites' in $directory { |
| 2395 | + include apache::mod::rewrite |
| 2396 | + } |
| 2397 | + |
| 2398 | + if 'setenv' in $directory { |
| 2399 | + include apache::mod::env |
| 2400 | + } |
| 2401 | + } |
| 2402 | + |
2357 | 2403 | concat::fragment { "${name}-directories": |
2358 | 2404 | target => "${priority_real}${filename}.conf", |
2359 | 2405 | order => 60, |
|
2488 | 2534 | # - $proxy_add_headers |
2489 | 2535 | # - $no_proxy_uris |
2490 | 2536 | if ($proxy_dest or $proxy_pass or $proxy_pass_match or $proxy_dest_match or $proxy_preserve_host) and $ensure == 'present' { |
2491 | | - include apache::mod::proxy |
2492 | 2537 | include apache::mod::proxy_http |
2493 | 2538 |
|
2494 | 2539 | concat::fragment { "${name}-proxy": |
|
0 commit comments