diff options
author | mh <mh@immerda.ch> | 2011-05-18 00:13:25 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-05-18 00:13:25 +0200 |
commit | 58847f6375cffe9c1018a7b51d5062b86796a534 (patch) | |
tree | 95d17096061cf4ca72eac1494cfdb6b4e3204f23 /templates/vhosts/php_simplemachine/php_simplemachine.erb | |
parent | 29517a83414f478a0e28a9fc57b178e35e9ba112 (diff) |
move header to partials
Diffstat (limited to 'templates/vhosts/php_simplemachine/php_simplemachine.erb')
-rw-r--r-- | templates/vhosts/php_simplemachine/php_simplemachine.erb | 72 |
1 files changed, 10 insertions, 62 deletions
diff --git a/templates/vhosts/php_simplemachine/php_simplemachine.erb b/templates/vhosts/php_simplemachine/php_simplemachine.erb index df04f77..abef976 100644 --- a/templates/vhosts/php_simplemachine/php_simplemachine.erb +++ b/templates/vhosts/php_simplemachine/php_simplemachine.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 %> @@ -63,23 +50,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> @@ -117,19 +93,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') %> @@ -148,10 +113,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 %>/"> @@ -175,20 +136,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') %> @@ -201,10 +153,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 %>/"> |