diff options
author | mh <mh@immerda.ch> | 2011-02-22 23:39:42 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-02-22 23:39:42 +0100 |
commit | 420b74afaa1a222b3fc17c8bf91b2890aef3232d (patch) | |
tree | 58928ad9a95e78e1450059bf5ec6dcdca5aea708 /templates/vhosts | |
parent | ecf2e416a19141d686fb92df5733500eb87cf793 (diff) |
try to fix a variable problem
Diffstat (limited to 'templates/vhosts')
-rw-r--r-- | templates/vhosts/default.erb | 5 | ||||
-rw-r--r-- | templates/vhosts/partials/header_default.erb | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb index 509f660..4a7d7f4 100644 --- a/templates/vhosts/default.erb +++ b/templates/vhosts/default.erb @@ -1,4 +1,7 @@ -<%- [:normal,:ssl].each do |vhost_part| %> +<%- [:normal,:ssl].each do |vhost_part| + # we need this variable in included templates + @vhost_part = vhost_part +%> <VirtualHost *:<%= vhost_part == :ssl ? '443' : '80' %> > <%= scope.function_template('apache/vhosts/partials/header_default.erb') %> diff --git a/templates/vhosts/partials/header_default.erb b/templates/vhosts/partials/header_default.erb index 13eeea1..7d43bde 100644 --- a/templates/vhosts/partials/header_default.erb +++ b/templates/vhosts/partials/header_default.erb @@ -1,5 +1,5 @@ Include include.d/defaults.inc - <%- if vhost_part == :ssl %> + <%- if @vhost_part == :ssl %> Include include.d/ssl_defaults.inc <%- end %> |