bf7ce40e2f
Apache's configuration for access control has changed on 2.4. To allow access to served directories we need to include the new directive "Require grant all". We scoped the configuration to only be applied on Apache 2.4. More information can be viewed on the Apache's upgrade document[1]. The tests were changed to ensure that the configuration is working without any extra override, as the extra test vhost is on a custom directory that requires the template to grant access to it. [1] http://httpd.apache.org/docs/trunk/upgrading.html Change-Id: I898ca049c5b3592cb70ad8c22eba8d4c681f3b22 Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com>
31 lines
982 B
Plaintext
31 lines
982 B
Plaintext
# ************************************
|
|
# Default template in module openstackinfra-httpd
|
|
# Managed by Puppet
|
|
# ************************************
|
|
|
|
NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|
<VirtualHost <%= @vhost_name %>:<%= @port %>>
|
|
ServerName <%= @srvname %>
|
|
<% if @serveraliases.is_a? Array -%>
|
|
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
|
<% elsif @serveraliases != nil -%>
|
|
<%= " ServerAlias #{@serveraliases}" -%>
|
|
<% end -%>
|
|
DocumentRoot <%= @docroot %>
|
|
<Directory <%= @docroot %>>
|
|
Options <%= @options %>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
Satisfy any
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
|
LogLevel warn
|
|
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
|
|
ServerSignature Off
|
|
</VirtualHost>
|
|
|