Host a devstack.org redirect on static
This provides a hollow "devstack.org" vhost as a permanent redirect to the docs.openstack.org/developer/devstack site. It also aliases *.devstack.org to the same vhost. Change-Id: Ib96e4d4e21bbdd961eb32529c66acf750d79bec5
This commit is contained in:
parent
aace25f971
commit
af6add3361
@ -243,4 +243,15 @@ class openstack_project::static (
|
||||
require => [File['/srv/static/specs'],
|
||||
$::project_config::config_dir],
|
||||
}
|
||||
|
||||
###########################################################
|
||||
# legacy devstack.org site redirect
|
||||
|
||||
apache::vhost { 'devstack.org':
|
||||
port => 80,
|
||||
priority => '50',
|
||||
docroot => 'MEANINGLESS_ARGUMENT',
|
||||
serveraliases => ['*.devstack.org'],
|
||||
template => 'openstack_project/devstack.vhost.erb',
|
||||
}
|
||||
}
|
||||
|
21
modules/openstack_project/templates/devstack.vhost.erb
Normal file
21
modules/openstack_project/templates/devstack.vhost.erb
Normal file
@ -0,0 +1,21 @@
|
||||
# ************************************
|
||||
# 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 @serveraliases != '' -%>
|
||||
<%= " ServerAlias #{@serveraliases}" %>
|
||||
<% end -%>
|
||||
|
||||
RewriteEngine On
|
||||
RewriteRule ^/(.*) http://docs.openstack.org/developer/devstack/$1 [last,redirect=permanent]
|
||||
|
||||
ErrorLog /var/log/apache2/<%= @name %>_error.log
|
||||
LogLevel warn
|
||||
CustomLog /var/log/apache2/<%= @name %>_access.log combined
|
||||
ServerSignature Off
|
||||
</VirtualHost>
|
Loading…
Reference in New Issue
Block a user