summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_typo3
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_typo3
parent29517a83414f478a0e28a9fc57b178e35e9ba112 (diff)
move header to partials
Diffstat (limited to 'templates/vhosts/php_typo3')
-rw-r--r--templates/vhosts/php_typo3/php_typo3.erb72
1 files changed, 10 insertions, 62 deletions
diff --git a/templates/vhosts/php_typo3/php_typo3.erb b/templates/vhosts/php_typo3/php_typo3.erb
index fd7d530..88e47ab 100644
--- a/templates/vhosts/php_typo3/php_typo3.erb
+++ b/templates/vhosts/php_typo3/php_typo3.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 -%>
@@ -22,10 +13,6 @@
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L]
<%- end -%>
- <%- if default_charset.to_s != 'absent' then -%>
-
- AddDefaultCharset <%= default_charset %>
- <%- end -%>
<%- if run_mode.to_s =~ /(proxy\-|static\-)?itk/ -%>
<IfModule mpm_itk_module>
@@ -76,23 +63,12 @@
<%- 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>
@@ -135,19 +111,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') %>
@@ -166,10 +131,6 @@
RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L]
<%- end -%>
- <%- if default_charset.to_s != 'absent' then -%>
- AddDefaultCharset <%= default_charset %>
-
- <%- end -%>
<%- if run_mode.to_s == 'static-itk' then -%>
<%- if not ssl_mode.to_s == 'force' then -%>
<Directory "<%= documentroot %>/">
@@ -202,20 +163,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') %>
@@ -228,10 +180,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 %>/">