Evaluate files website vhosts in context of website not vhost
To deal with puppet scoping fun we evaluate the template for our files.o.o website vhosts in the context of the website define and not in the context of httpd::vhost. Change-Id: I90bb881eb6ad78cede3a8a2548e1dfcf24e1160b
This commit is contained in:
parent
0ace6c2614
commit
9ea8edc341
@ -44,7 +44,7 @@ define openstack_project::website (
|
|||||||
port => 443, # Is required despite not being used.
|
port => 443, # Is required despite not being used.
|
||||||
docroot => $docroot_,
|
docroot => $docroot_,
|
||||||
priority => '50',
|
priority => '50',
|
||||||
template => $template,
|
content => template($template)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ssl_cert != undef) {
|
if ($ssl_cert != undef) {
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
# ************************************
|
# ************************************
|
||||||
|
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName <%= @srvname %>
|
ServerName <%= @name %>
|
||||||
<% if @serveraliases.is_a? Array -%>
|
<% if @aliases.is_a? Array -%>
|
||||||
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
<% @aliases.each do |alias_name| -%><%= " ServerAlias #{alias_name}\n" %><% end -%>
|
||||||
<% elsif @serveraliases != nil -%>
|
<% elsif @aliases != nil -%>
|
||||||
<%= " ServerAlias #{@serveraliases}" -%>
|
<%= " ServerAlias #{@aliases}" -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteRule ^/(.*) https://<%= @srvname %>/$1 [last,redirect=permanent]
|
RewriteRule ^/(.*) https://<%= @name %>/$1 [last,redirect=permanent]
|
||||||
|
|
||||||
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
<IfModule mod_ssl.c>
|
<IfModule mod_ssl.c>
|
||||||
<VirtualHost *:443>
|
<VirtualHost *:443>
|
||||||
ServerName <%= @srvname %>
|
ServerName <%= @name %>
|
||||||
<% if @serveraliases.is_a? Array -%>
|
<% if @aliases.is_a? Array -%>
|
||||||
<% @serveraliases.each do |name| -%><%= " ServerAlias #{name}\n" %><% end -%>
|
<% @aliases.each do |alias_name| -%><%= " ServerAlias #{alias_name}\n" %><% end -%>
|
||||||
<% elsif @serveraliases != nil -%>
|
<% elsif @aliases != nil -%>
|
||||||
<%= " ServerAlias #{@serveraliases}" -%>
|
<%= " ServerAlias #{@aliases}" -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
@ -41,8 +41,8 @@
|
|||||||
SSLCertificateKeyFile <%= @ssl_key_file_ %>
|
SSLCertificateKeyFile <%= @ssl_key_file_ %>
|
||||||
SSLCertificateChainFile <%= @ssl_chain_file_ %>
|
SSLCertificateChainFile <%= @ssl_chain_file_ %>
|
||||||
|
|
||||||
DocumentRoot <%= @docroot %>
|
DocumentRoot <%= @docroot_ %>
|
||||||
<Directory <%= @docroot %>>
|
<Directory <%= @docroot_ %>>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
Satisfy any
|
Satisfy any
|
||||||
Require all granted
|
Require all granted
|
||||||
|
Loading…
Reference in New Issue
Block a user