From 19b82679fe3b4114a7b96ef50364ddad5df9ac9a Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Fri, 18 Nov 2016 17:40:47 +0100 Subject: [PATCH] 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 --- .../templates/static-governance.vhost.erb | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/openstack_project/templates/static-governance.vhost.erb b/modules/openstack_project/templates/static-governance.vhost.erb index e66d096936..93f032de0b 100644 --- a/modules/openstack_project/templates/static-governance.vhost.erb +++ b/modules/openstack_project/templates/static-governance.vhost.erb @@ -22,11 +22,18 @@ <% scope.lookupvar('openstack_project::static::governance_directories').each do |dirname| -%> > Options Indexes FollowSymLinks MultiViews - AllowOverride FileInfo + AllowOverride None Satisfy Any Require all granted <% end -%> + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Satisfy Any + Require all granted + ErrorDocument 404 /badges/project-unofficial.svg + 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| -%> > Options Indexes FollowSymLinks MultiViews - AllowOverride FileInfo + AllowOverride None Satisfy Any Require all granted <% end -%> + + Options Indexes FollowSymLinks MultiViews + AllowOverride None + Satisfy Any + Require all granted + ErrorDocument 404 /badges/project-unofficial.svg + LogLevel warn ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined