Fix httpd apply in Ubuntu Precise
Alteration of the Apache configuration for apply in the Ubuntu Precise. It was changed for mod_disk_cache because mod_cache_disk not exist for the Precise and check Apache Version due the parameter "Require all Granted". Change-Id: Icc1d13fc39058f147bdbb1e6b9a810143051ece4 Co-Authored-By: Maitê Balhester <mbalhest@thoughtworks.com>
This commit is contained in:
parent
c4600ed6e1
commit
10bb4095f0
@ -71,8 +71,14 @@ class openstack_health::api(
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
if ! defined(Httpd::Mod['cache_disk']) {
|
||||
httpd::mod { 'cache_disk':
|
||||
|
||||
if $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '12.04' {
|
||||
$cache_disk_module = 'disk_cache'
|
||||
} else {
|
||||
$cache_disk_module = 'cache_disk'
|
||||
}
|
||||
if ! defined(Httpd::Mod[$cache_disk_module]) {
|
||||
httpd::mod { $cache_disk_module:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,23 @@ WSGIPythonHome <%= scope.lookupvar("openstack_health::api::virtualenv_dir") %>
|
||||
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
<IfModule mod_cache.c>
|
||||
<IfModule mod_cache_disk.c>
|
||||
<% if @operatingsystem == "Ubuntu" and @operatingsystemrelease == "12.04" %>
|
||||
<IfModule mod_disk_cache.c>
|
||||
<% else %>
|
||||
<IfModule mod_cache_disk.c>
|
||||
<% end %>
|
||||
CacheRoot "/var/cache/apache2/mod_disk_cache"
|
||||
CacheEnable disk "/"
|
||||
CacheDirLevels 5
|
||||
CacheDirLength 3
|
||||
CacheLock on
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
DocumentRoot <%= scope.lookupvar("openstack_health::api::api_dir") %>
|
||||
|
@ -12,7 +12,9 @@ Listen <%= @vhost_port %>
|
||||
<Directory <%= @frontend_dir %>>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Require all granted
|
||||
<IfVersion >= 2.4>
|
||||
Require all granted
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
DocumentRoot <%= @frontend_dir %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user