b54344129d
We almost never define $serveraliases which means that it's always going to be empty. Puppet 4 is more strict about types and converting undef to nil so this change makes sure that an undefined variable doesn't accidentally get evaluated as existing and cause an invalid apache config. In the places where we're already just comparing @serveraliases to nil, just leave them alone. Nil should be the expected value for undefined variables going forward in puppet 4, so as long as it's working in puppet 3 let's keep it. Change-Id: I68ea8e1fde5d422f821453ff618d827e3cbe1c43
86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
# ************************************
|
|
# 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 ! ['', nil].include?(@serveraliases) -%>
|
|
<%= " ServerAlias #{@serveraliases}" %>
|
|
<% end -%>
|
|
DocumentRoot <%= @docroot %>
|
|
|
|
Alias /bugday /srv/static/bugdaystats
|
|
<Directory /srv/static/bugdaystats>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
Alias /reviews /srv/static/reviewday
|
|
<Directory /srv/static/reviewday>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
Alias /openstack-health /srv/static/openstack-health
|
|
<Directory /srv/static/openstack-health>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
<Directory <%= @docroot %>>
|
|
Options <%= @options %>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
# Sample elastic-recheck config file, adjust prefixes
|
|
# per your local configuration. Because these are nested
|
|
# we need the more specific one first.
|
|
Alias /elastic-recheck/data /var/lib/elastic-recheck
|
|
<Directory /var/lib/elastic-recheck>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
RedirectMatch permanent ^/rechecks(.*) /elastic-recheck
|
|
Alias /elastic-recheck /usr/local/share/elastic-recheck
|
|
<Directory /usr/local/share/elastic-recheck>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
<IfVersion >= 2.4>
|
|
Require all granted
|
|
</IfVersion>
|
|
</Directory>
|
|
|
|
RedirectMatch temp ^/zuul(.*) http://zuul.openstack.org/
|
|
|
|
ErrorLog /var/log/apache2/<%= @name %>_error.log
|
|
LogLevel warn
|
|
CustomLog /var/log/apache2/<%= @name %>_access.log combined
|
|
ServerSignature Off
|
|
</VirtualHost>
|