system-config/modules/openstack_project/templates/static-governance.vhost.erb
Joshua Hesketh 4ebafcde34 Add election alias to governance.openstack.org
Add an alias for /election/ to go to /srv/static/election where
the election repo will be published to.

This is a reworked resubmission of
Ie5e783c65396e9fb74f3d739e775e51a948652fe which was reverted in
I808e654a6fb77440e7aecbde4456ddc720fe0d9a .

Change-Id: I1a8e179d26e57247322fe3ed604e838722d43334
Partially-Implements: spec publish-election-repo
Co-Authored-By: Jeremy Stanley <fungi@yuggoth.org>
2016-07-03 15:06:33 +00:00

70 lines
2.5 KiB
Plaintext

# ************************************
# Managed by Puppet
# ************************************
<VirtualHost *:80>
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| -%>
<Directory <%= dirname %>>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Satisfy Any
Require all granted
</Directory>
<% end -%>
LogLevel warn
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
ServerSignature Off
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName <%= @vhost_name %>
DocumentRoot <%= @docroot %>
SSLEngine on
SSLProtocol All -SSLv2 -SSLv3
# Once the machine is using something to terminate TLS that supports ECDHE
# then this should be edited to remove the RSA+AESGCM:RSA+AES so that PFS
# only is guarenteed.
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
SSLHonorCipherOrder on
SSLCertificateFile <%= scope['openstack_project::static::cert_file'] %>
SSLCertificateKeyFile <%= scope['openstack_project::static::key_file'] %>
<% if scope['openstack_project::static::chain_file'] != '' %>
SSLCertificateChainFile <%= scope['openstack_project::static::chain_file'] %>
<% end %>
# 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| -%>
<Directory <%= dirname %>>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Satisfy Any
Require all granted
</Directory>
<% end -%>
LogLevel warn
ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
ServerSignature Off
</VirtualHost>
</IfModule>