From 0c0220dcbf1d2e52079735d554853be3d7c0670e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 25 May 2016 12:05:24 -0700 Subject: [PATCH] Add VirtualHost to cacti vhost It was missing the actual 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 --- manifests/site.pp | 1 + modules/openstack_project/manifests/cacti.pp | 1 + .../templates/cacti.vhost.erb | 32 +++++++++++-------- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index c3aefcb243..77855ae713 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -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', } } diff --git a/modules/openstack_project/manifests/cacti.pp b/modules/openstack_project/manifests/cacti.pp index 4b8f79ff84..23ac115e83 100644 --- a/modules/openstack_project/manifests/cacti.pp +++ b/modules/openstack_project/manifests/cacti.pp @@ -2,6 +2,7 @@ class openstack_project::cacti ( $sysadmins = [], $cacti_hosts = [], + $vhost_name = '', ) { if $::osfamily != 'Debian' { diff --git a/modules/openstack_project/templates/cacti.vhost.erb b/modules/openstack_project/templates/cacti.vhost.erb index 6ab87f9dbf..77886a5fc3 100644 --- a/modules/openstack_project/templates/cacti.vhost.erb +++ b/modules/openstack_project/templates/cacti.vhost.erb @@ -2,22 +2,26 @@ # Managed by Puppet # ************************************ -Alias /cacti /usr/share/cacti/site + + ServerName <%= @vhost_name %> -RewriteEngine on -RewriteRule ^/$ /cacti/graph_view.php [R,L] + Alias /cacti /usr/share/cacti/site - - Options +FollowSymLinks - AllowOverride None - order allow,deny - allow from all - = 2.4> - Require all granted - + RewriteEngine on + RewriteRule ^/$ /cacti/graph_view.php [R,L] - AddType application/x-httpd-php .php + + Options +FollowSymLinks + AllowOverride None + order allow,deny + allow from all + = 2.4> + Require all granted + - DirectoryIndex index.php - + AddType application/x-httpd-php .php + DirectoryIndex index.php + + +