Fix site directory defaults for apache 2.4
With the 2.4 release the site config for directies was changed as noted in the bug link. If necessary, in the future we could create a list attribute to hold the directory options to allow them to be overrideable, but no one has asked for that yet. This could also use the apache cookbook web_app provider to create this site config. Also cleaned up some minor formatting in the specs. Change-Id: Ie2b323ac055ae03b3c4ebb28b70aca65745df842 Closes-Bug: #1411772
This commit is contained in:
parent
ad7957e5d7
commit
7886c81a74
@ -21,6 +21,7 @@ This file is used to list changes made in each version of the openstack-dashboar
|
|||||||
* Allow TraceEnable to be configured
|
* Allow TraceEnable to be configured
|
||||||
* Allow volume_api_version to be configured for Horizon
|
* Allow volume_api_version to be configured for Horizon
|
||||||
* Allow webserver to be configurable
|
* Allow webserver to be configurable
|
||||||
|
* Fix site template directory defaults for apache 2.4
|
||||||
|
|
||||||
## 9.1
|
## 9.1
|
||||||
* python_packages database client attributes have been moved to the -common cookbook
|
* python_packages database client attributes have been moved to the -common cookbook
|
||||||
|
@ -284,6 +284,17 @@ describe 'openstack-dashboard::apache2-server' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'directory options' do
|
||||||
|
it 'sets default options for apache 2.2' do
|
||||||
|
expect(chef_run).to render_file(file.name).with_content(/^\s*Order allow,deny\n\s*allow from all$/)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'sets default options for apache 2.4' do
|
||||||
|
node.set['apache']['version'] = '2.4'
|
||||||
|
expect(chef_run).to render_file(file.name).with_content(/^\s*Require all granted$/)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'log directives' do
|
context 'log directives' do
|
||||||
before do
|
before do
|
||||||
node.set['apache']['log_dir'] = 'log_dir_value'
|
node.set['apache']['log_dir'] = 'log_dir_value'
|
||||||
|
@ -50,7 +50,6 @@ describe 'openstack-dashboard::horizon' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'does not remove openstack-dashboard-ubuntu-theme package' do
|
it 'does not remove openstack-dashboard-ubuntu-theme package' do
|
||||||
|
|
||||||
expect(chef_run).not_to purge_package('openstack-dashboard-ubuntu-theme')
|
expect(chef_run).not_to purge_package('openstack-dashboard-ubuntu-theme')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -44,15 +44,23 @@ NameVirtualHost *:<%= node['openstack']['dashboard']['https_port'].to_i%>
|
|||||||
<Directory <%= node["openstack"]["dashboard"]["dash_path"] %>>
|
<Directory <%= node["openstack"]["dashboard"]["dash_path"] %>>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
<% if node['apache']['version'] == '2.4' -%>
|
||||||
|
Require all granted
|
||||||
|
<% else -%>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
allow from all
|
allow from all
|
||||||
|
<% end -%>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory <%= node["openstack"]["dashboard"]["static_path"] %>>
|
<Directory <%= node["openstack"]["dashboard"]["static_path"] %>>
|
||||||
Options FollowSymLinks MultiViews
|
Options FollowSymLinks MultiViews
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
<% if node['apache']['version'] == '2.4' -%>
|
||||||
|
Require all granted
|
||||||
|
<% else -%>
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
allow from all
|
allow from all
|
||||||
|
<% end -%>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<% if node["openstack"]["dashboard"]["use_ssl"] %>
|
<% if node["openstack"]["dashboard"]["use_ssl"] %>
|
||||||
|
Loading…
Reference in New Issue
Block a user