summaryrefslogtreecommitdiff
path: root/templates/vhosts/php_joomla
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_joomla
parent29517a83414f478a0e28a9fc57b178e35e9ba112 (diff)
move header to partials
Diffstat (limited to 'templates/vhosts/php_joomla')
-rw-r--r--templates/vhosts/php_joomla/php_joomla.erb55
1 files changed, 9 insertions, 46 deletions
diff --git a/templates/vhosts/php_joomla/php_joomla.erb b/templates/vhosts/php_joomla/php_joomla.erb
index b83d910..35532da 100644
--- a/templates/vhosts/php_joomla/php_joomla.erb
+++ b/templates/vhosts/php_joomla/php_joomla.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') %>
@@ -23,10 +14,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 =~ /(proxy\-|static\-)?itk/ -%>
<IfModule mpm_itk_module>
AssignUserId <%= run_uid+" "+run_gid %>
@@ -78,24 +65,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>
@@ -207,20 +183,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') %>
@@ -233,10 +200,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 %>/">