diff --git a/modules/openstack_project/templates/static-governance.vhost.erb b/modules/openstack_project/templates/static-governance.vhost.erb index 9e75006b2f..dc3cfa1cd0 100644 --- a/modules/openstack_project/templates/static-governance.vhost.erb +++ b/modules/openstack_project/templates/static-governance.vhost.erb @@ -5,39 +5,12 @@ ServerName <%= @vhost_name %> <% if @serveraliases.is_a? Array -%> - # Permanently redirect these ServerAlias entries to ServerName <% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%> <% elsif @serveraliases != '' -%> <%= " ServerAlias #{@serveraliases}" %> - RewriteEngine On - RewriteCond %{HTTP_HOST} !<%= @vhost_name %>$ [NC] - RewriteRule ^/(.*)$ http://<%= @vhost_name %>/$1 [L,R=301] <% end -%> - DocumentRoot <%= @docroot %> - - # Alias other folders - <% scope.lookupvar('openstack_project::static::governance_aliases').each do |a, d| -%> - Alias "<%= a %>" "<%= d %>" - <% end -%> - <% scope.lookupvar('openstack_project::static::governance_directories').each do |dirname| -%> - > - Options Indexes FollowSymLinks MultiViews - AllowOverride None - Satisfy Any - Require all granted - - <% end -%> - - Options Indexes FollowSymLinks MultiViews - AllowOverride None - Satisfy Any - Require all granted - - Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" - Header set Pragma "no-cache" - - ErrorDocument 404 /badges/project-unofficial.svg - + RewriteEngine On + RewriteRule ^/(.*) https://<%= @vhost_name %>/$1 [last,redirect=permanent] LogLevel warn ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined