system-config/modules/openstack_project/templates/trystack.vhost.erb
Paul Belanger 884a1c3432 Rewrite trystack.org to trystack.o.o
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>
2015-08-13 15:29:23 -04:00

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>