System configuration for OpenStack Infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

static-https-redirect.vhost.erb 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # ************************************
  2. # Managed by Puppet
  3. # ************************************
  4. <VirtualHost *:80>
  5. ServerName <%= @vhost_name %>
  6. <% if @serveraliases.is_a? Array -%>
  7. <% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
  8. <% elsif ! ['', nil].include?(@serveraliases) -%>
  9. <%= " ServerAlias #{@serveraliases}" %>
  10. <% end -%>
  11. RewriteEngine On
  12. RewriteRule ^/(.*) https://<%= @vhost_name %>/$1 [last,redirect=permanent]
  13. LogLevel warn
  14. ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
  15. CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
  16. ServerSignature Off
  17. </VirtualHost>
  18. <IfModule mod_ssl.c>
  19. <VirtualHost *:443>
  20. ServerName <%= @vhost_name %>
  21. DocumentRoot <%= @docroot %>
  22. SSLEngine on
  23. SSLProtocol All -SSLv2 -SSLv3
  24. # Once the machine is using something to terminate TLS that supports ECDHE
  25. # then this should be edited to remove the RSA+AESGCM:RSA+AES so that PFS
  26. # only is guarenteed.
  27. SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
  28. SSLHonorCipherOrder on
  29. SSLCertificateFile <%= scope['openstack_project::static::cert_file'] %>
  30. SSLCertificateKeyFile <%= scope['openstack_project::static::key_file'] %>
  31. <% if scope['openstack_project::static::chain_file'] != '' %>
  32. SSLCertificateChainFile <%= scope['openstack_project::static::chain_file'] %>
  33. <% end %>
  34. <Directory <%= @docroot %>>
  35. Options Indexes FollowSymLinks MultiViews
  36. AllowOverride None
  37. AllowOverrideList Redirect RedirectMatch
  38. Satisfy Any
  39. Require all granted
  40. </Directory>
  41. LogLevel warn
  42. ErrorLog /var/log/apache2/<%= @vhost_name %>_error.log
  43. CustomLog /var/log/apache2/<%= @vhost_name %>_access.log combined
  44. ServerSignature Off
  45. </VirtualHost>
  46. </IfModule>