summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/default.erb5
-rw-r--r--templates/vhosts/partials/header_default.erb2
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 %>