diff options
Diffstat (limited to 'templates/vhosts/default.erb')
-rw-r--r-- | templates/vhosts/default.erb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/vhosts/default.erb b/templates/vhosts/default.erb new file mode 100644 index 0000000..9e16337 --- /dev/null +++ b/templates/vhosts/default.erb @@ -0,0 +1,16 @@ +<%- [:normal,:ssl].each do |vhost_part| %> +<VirtualHost *:<%= vhost_part == :ssl ? '443' : '80' > + + <%= scope.function_template('apache/vhost/partials/header_default.erb') %> + <%= scope.function_template('apache/vhost/partials/logs.erb') %> + + <%- if ssl_mode == 'force' && vhost_part == :ssl %> + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule (.*) https://%{SERVER_NAME}$1 [R=permanent,L] + <%- else %> + <%= scope.function_template(template_partial) %> + <%- end %> + +</VirtualHost> +<%- end %> |