From cf93189f1473bdafcbad469cc3a153dd7714af0e Mon Sep 17 00:00:00 2001
From: Sean Dague <sean.dague@samsung.com>
Date: Fri, 6 Dec 2013 18:54:41 -0500
Subject: [PATCH] fix alias order for elastic-recheck

Apache aliases need to nest from the most narrow to the most
broad. I had these backwards, thus breaking the web console.

While it was hot fixed, this is the permanent fix.

Change-Id: I26209dea29ce2d29701b81a53360fff358ccdd77
---
 .../templates/status.vhost.erb                 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/modules/openstack_project/templates/status.vhost.erb b/modules/openstack_project/templates/status.vhost.erb
index 7128a25926..d3ed3e34da 100644
--- a/modules/openstack_project/templates/status.vhost.erb
+++ b/modules/openstack_project/templates/status.vhost.erb
@@ -39,14 +39,8 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
   </Directory>
 
   # Sample elastic-recheck config file, adjust prefixes
-  # per your local configuration
-  Alias /elastic-recheck /usr/local/share/elastic-recheck
-  <Directory /usr/local/share/elastic-recheck>
-      AllowOverride None
-      Order allow,deny
-      allow from all
-  </Directory>
-
+  # 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
@@ -54,6 +48,14 @@ NameVirtualHost <%= vhost_name %>:<%= port %>
       allow from all
   </Directory>
 
+  Alias /elastic-recheck /usr/local/share/elastic-recheck
+  <Directory /usr/local/share/elastic-recheck>
+      AllowOverride None
+      Order allow,deny
+      allow from all
+  </Directory>
+
+
   ErrorLog /var/log/apache2/<%= name %>_error.log
   LogLevel warn
   CustomLog /var/log/apache2/<%= name %>_access.log combined