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:
parent
cce6b7f1dd
commit
0c0220dcbf
@ -220,6 +220,7 @@ node 'cacti.openstack.org' {
|
|||||||
class { 'openstack_project::cacti':
|
class { 'openstack_project::cacti':
|
||||||
sysadmins => hiera('sysadmins', []),
|
sysadmins => hiera('sysadmins', []),
|
||||||
cacti_hosts => hiera_array('cacti_hosts'),
|
cacti_hosts => hiera_array('cacti_hosts'),
|
||||||
|
vhost_name => 'cacti.openstack.org',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
class openstack_project::cacti (
|
class openstack_project::cacti (
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
$cacti_hosts = [],
|
$cacti_hosts = [],
|
||||||
|
$vhost_name = '',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if $::osfamily != 'Debian' {
|
if $::osfamily != 'Debian' {
|
||||||
|
@ -2,22 +2,26 @@
|
|||||||
# Managed by Puppet
|
# Managed by Puppet
|
||||||
# ************************************
|
# ************************************
|
||||||
|
|
||||||
Alias /cacti /usr/share/cacti/site
|
<VirtualHost *:80>
|
||||||
|
ServerName <%= @vhost_name %>
|
||||||
|
|
||||||
RewriteEngine on
|
Alias /cacti /usr/share/cacti/site
|
||||||
RewriteRule ^/$ /cacti/graph_view.php [R,L]
|
|
||||||
|
|
||||||
<Directory /usr/share/cacti/site>
|
RewriteEngine on
|
||||||
Options +FollowSymLinks
|
RewriteRule ^/$ /cacti/graph_view.php [R,L]
|
||||||
AllowOverride None
|
|
||||||
order allow,deny
|
|
||||||
allow from all
|
|
||||||
<IfVersion >= 2.4>
|
|
||||||
Require all granted
|
|
||||||
</IfVersion>
|
|
||||||
|
|
||||||
AddType application/x-httpd-php .php
|
<Directory /usr/share/cacti/site>
|
||||||
|
Options +FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
order allow,deny
|
||||||
|
allow from all
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
|
||||||
DirectoryIndex index.php
|
AddType application/x-httpd-php .php
|
||||||
</Directory>
|
|
||||||
|
|
||||||
|
DirectoryIndex index.php
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
Loading…
Reference in New Issue
Block a user