summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_drupal
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-05-18 00:13:25 +0200
committermh <mh@immerda.ch>2011-05-18 00:13:25 +0200
commit58847f6375cffe9c1018a7b51d5062b86796a534 (patch)
tree95d17096061cf4ca72eac1494cfdb6b4e3204f23 /templates/vhosts/php_drupal
parent29517a83414f478a0e28a9fc57b178e35e9ba112 (diff)
move header to partials
Diffstat (limited to 'templates/vhosts/php_drupal')
-rw-r--r--templates/vhosts/php_drupal/php_drupal.erb63
1 files changed, 10 insertions, 53 deletions
diff --git a/templates/vhosts/php_drupal/php_drupal.erb b/templates/vhosts/php_drupal/php_drupal.erb
index 9fbda55..304e8b1 100644
--- a/templates/vhosts/php_drupal/php_drupal.erb
+++ b/templates/vhosts/php_drupal/php_drupal.erb
@@ -4,16 +4,7 @@
<%- end -%>
<%- unless ssl_mode.to_s == 'only' then -%>
<VirtualHost *:80>
- Include include.d/defaults.inc
-
- ServerName <%= servername %>
- <%- unless serveralias.to_s.empty? then -%>
- ServerAlias <%= serveralias %>
- <%- end -%>
- <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%>
- ServerAdmin <%= server_admin %>
- <%- end -%>
- DocumentRoot <%= documentroot %>/
+<%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
<%- if ssl_mode.to_s == 'force' then -%>
@@ -90,23 +81,13 @@
<%- unless ssl_mode.to_s == 'false' then -%>
<VirtualHost *:443>
- Include include.d/defaults.inc
- Include include.d/ssl_defaults.inc
-
- ServerName <%= servername %>
- <%- unless serveralias.to_s.empty? then -%>
- ServerAlias <%= serveralias %>
- <%- end -%>
- <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%>
- ServerAdmin <%= server_admin %>
- <%- end -%>
- DocumentRoot <%= documentroot %>/
+<% scope.unsetvar('vhost_part')
+ scope.setvar('vhost_part',:ssl) -%>
+ <%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
+<% scope.unsetvar('vhost_part') -%>
<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
- <%- if default_charset.to_s != 'absent' then -%>
- AddDefaultCharset <%= default_charset %>
- <%- end -%>
<%- if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%>
<IfModule mpm_itk_module>
@@ -172,19 +153,8 @@
<IfDefine !HttpdLocal>
<%- unless ssl_mode.to_s == 'only' then -%>
<VirtualHost *:80>
- Include include.d/defaults.inc
-
- ServerName <%= servername %>
- <%- unless serveralias.to_s.empty? then -%>
- ServerAlias <%= serveralias %>
- <%- end -%>
- <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%>
- ServerAdmin <%= server_admin %>
- <%- end -%>
- <%- if run_mode.to_s == 'static-itk' -%>
- DocumentRoot <%= documentroot %>/
+<%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
DirectoryIndex index.htm index.html index.php
- <%- end -%>
<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
@@ -249,20 +219,11 @@
<%- unless ssl_mode.to_s == 'false' then -%>
<VirtualHost *:443>
- Include include.d/defaults.inc
- Include include.d/ssl_defaults.inc
-
- ServerName <%= servername %>
- <%- unless serveralias.to_s.empty? then -%>
- ServerAlias <%= serveralias %>
- <%- end -%>
- <%- unless server_admin.to_s.empty? or server_admin.to_s == 'absent' then -%>
- ServerAdmin <%= server_admin %>
- <%- end -%>
- <%- if run_mode.to_s == 'static-itk' -%>
- DocumentRoot <%= documentroot %>/
+<% scope.unsetvar('vhost_part')
+ scope.setvar('vhost_part',:ssl) -%>
+ <%= scope.function_template('apache/vhosts/partials/header_default.erb') %>
+<% scope.unsetvar('vhost_part') -%>
DirectoryIndex index.htm index.html index.php
- <%- end -%>
<%= scope.function_template('apache/vhosts/partials/logs.erb') %>
@@ -275,10 +236,6 @@
ProxyPass / https://127.0.0.1/
<%- end -%>
ProxyPassReverse / https://127.0.0.1/
- <%- if default_charset.to_s != 'absent' then -%>
-
- AddDefaultCharset <%= default_charset %>
- <%- end -%>
<%- if run_mode.to_s == 'static-itk' -%>
<Directory "<%= documentroot %>/">