Add rewrite rules for badges in the vhost config

Instead of relying on a .htaccess file in the governance repo, this sets
the ErrorDocument rule in the vhost configs directly, only for the
`/badges` subdir.

Change-Id: Icd0568ec67f12b7349765d2aefa348661dac880a
This commit is contained in:
Flavio Percoco 2016-11-18 17:40:47 +01:00
parent 5e22e65f47
commit 19b82679fe

View File

@ -22,11 +22,18 @@
<% scope.lookupvar('openstack_project::static::governance_directories').each do |dirname| -%>
<Directory <%= dirname %>>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
AllowOverride None
Satisfy Any
Require all granted
</Directory>
<% end -%>
<Directory /srv/static/governance/badges>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Satisfy Any
Require all granted
ErrorDocument 404 /badges/project-unofficial.svg
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
@ -56,11 +63,18 @@
<% scope.lookupvar('openstack_project::static::governance_directories').each do |dirname| -%>
<Directory <%= dirname %>>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo
AllowOverride None
Satisfy Any
Require all granted
</Directory>
<% end -%>
<Directory /srv/static/governance/badges>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Satisfy Any
Require all granted
ErrorDocument 404 /badges/project-unofficial.svg
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined