Skip to content

Commit 20fc4c9

Browse files
committed
Merge pull request puppetlabs#1237 from damonconway/modules-2757
(MODULES-2757) Adding if around ServerName in template
2 parents 2ca3ea9 + b63ea4c commit 20fc4c9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,8 @@ Sets the Apache server administrator's contact information via Apache's [`Server
10931093

10941094
Sets the Apache server name via Apache's [`ServerName`][] directive. Default: the 'fqdn' fact reported by [Facter][].
10951095

1096+
Setting to false will not set ServerName at all.
1097+
10961098
##### `server_root`
10971099

10981100
Sets the Apache server's root directory via Apache's [`ServerRoot`][] directive. Default: determined by your operating system.

templates/vhost/_file_header.erb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# ************************************
55

66
<VirtualHost <%= [@nvh_addr_port].flatten.compact.join(' ') %>>
7+
<% if @servername -%>
78
ServerName <%= @servername %>
9+
<% end -%>
810
<% if @serveradmin -%>
911
ServerAdmin <%= @serveradmin %>
1012
<% end -%>

0 commit comments

Comments
 (0)