Merge "Add ServerAlias support to the vhost config"

This commit is contained in:
Jenkins 2016-07-22 09:15:53 +00:00 committed by Gerrit Code Review
commit 69ed382677
2 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,7 @@ class hound (
$datadir = '/home/hound/data',
$manage_config = true,
$serveradmin = "webmaster@${::fqdn}",
$serveraliases = undef,
$vhost_name = $::fqdn,
$ulimit_max_open_files = 2048,
) {

View File

@ -1,5 +1,10 @@
<VirtualHost *:80>
ServerName <%= scope.lookupvar("hound::vhost_name") %>
<% if @serveraliases.is_a? Array -%>
<% @serveraliases.each do |name| %><%= " ServerAlias #{name}\n" %><% end %>
<% elsif @serveraliases -%>
<%= " ServerAlias #{@serveraliases}" %>
<% end %>
ServerAdmin <%= @serveradmin %>
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("hound::vhost_name") %>-error.log