884a1c3432
Add the required serveraliases and rewrite settings needed to support both trystack.openstack.org and trystack.org. Change-Id: I1a6560be8a1a24b50b1d047ed990e5f029ac5ee5 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
33 lines
967 B
Plaintext
33 lines
967 B
Plaintext
# ************************************
|
|
# 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 -%>
|
|
|
|
# NOTE(pabelanger): Rewrite any valid serveraliases to srvname.
|
|
RewriteEngine On
|
|
RewriteCond %{HTTP_HOST} !<%= @srvname %>$ [NC]
|
|
RewriteRule ^/(.*)$ http://<%= @srvname %>/$1 [L,R=301]
|
|
|
|
DocumentRoot <%= @docroot %>
|
|
<Directory <%= @docroot %>>
|
|
Options <%= @options %>
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
Satisfy Any
|
|
</Directory>
|
|
|
|
ErrorLog /var/log/apache2/<%= @name %>_error.log
|
|
LogLevel warn
|
|
CustomLog /var/log/apache2/<%= @name %>_access.log combined
|
|
ServerSignature Off
|
|
</VirtualHost>
|