Add VirtualHost to cacti vhost

It was missing the actual <VirtualHost> tag, which means that it
would lose out to the default vhost file that puppetlabs-apache
creates.  This may have behaved differently on apache2.2, but
it is certainly a problem on apache2.4 now that we have upgraded
to trusty.

Change-Id: I750ea9b8625d8d240616ce8306da81bcee832c95
This commit is contained in:
James E. Blair 2016-05-25 12:05:24 -07:00
parent cce6b7f1dd
commit 0c0220dcbf
3 changed files with 20 additions and 14 deletions

View File

@ -220,6 +220,7 @@ node 'cacti.openstack.org' {
class { 'openstack_project::cacti':
sysadmins => hiera('sysadmins', []),
cacti_hosts => hiera_array('cacti_hosts'),
vhost_name => 'cacti.openstack.org',
}
}

View File

@ -2,6 +2,7 @@
class openstack_project::cacti (
$sysadmins = [],
$cacti_hosts = [],
$vhost_name = '',
) {
if $::osfamily != 'Debian' {

View File

@ -2,6 +2,9 @@
# Managed by Puppet
# ************************************
<VirtualHost *:80>
ServerName <%= @vhost_name %>
Alias /cacti /usr/share/cacti/site
RewriteEngine on
@ -21,3 +24,4 @@ RewriteRule ^/$ /cacti/graph_view.php [R,L]
DirectoryIndex index.php
</Directory>
</VirtualHost>