Skip to content

Commit e43b9a1

Browse files
committed
Add virtual docroot default
1 parent e4a1532 commit e43b9a1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

manifests/vhost.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,7 @@
17461746
Variant[Boolean,String] $docroot,
17471747
$manage_docroot = true,
17481748
$virtual_docroot = false,
1749+
$virtual_use_default_docroot = false,
17491750
$port = undef,
17501751
$ip = undef,
17511752
Boolean $ip_based = false,
@@ -2429,6 +2430,7 @@
24292430

24302431
# Template uses:
24312432
# - $virtual_docroot
2433+
# - $virtual_use_default_docroot
24322434
# - $docroot
24332435
if $docroot {
24342436
concat::fragment { "${name}-docroot":

templates/vhost/_docroot.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
## Vhost docroot
33
<% if @virtual_docroot -%>
44
VirtualDocumentRoot "<%= @virtual_docroot %>"
5-
<% elsif @docroot -%>
5+
<% end -%>
6+
<% if @docroot and ((not @virtual_docroot) or @virtual_use_default_docroot) -%>
67
DocumentRoot "<%= @docroot %>"
78
<% end -%>

0 commit comments

Comments
 (0)