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-http-and-https.vhost.erb 2.1KB

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