summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/site.pp61
-rw-r--r--templates/site.erb2
2 files changed, 33 insertions, 30 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index 6b923fb..f90bcbc 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1,34 +1,35 @@
define apache::site(
- $ensure = present,
- $docroot = false,
- $redirect = false,
- $redirect_match = false,
- $protocol = 'http',
- $aliases = false,
- $server_alias = false,
- $use = false,
- $ticket = false,
- $source = false,
- $template = 'apache/site.erb',
- $filename = '',
- $manage_docroot = true,
- $owner = 'root',
- $group = 'root',
- $mpm = true,
- $mpm_user = '',
- $mpm_group = '',
- $password = '*',
- $comment = '',
- $sshkey = absent,
- $groups = '',
- $shell = '/bin/false',
- $manage_user = true,
- $ssl = false,
- $listen = '*',
- $https_redirect = false,
- $canonical = false,
- $canonical_exceptions = '',
- $hidden_service = false
+ $ensure = present,
+ $docroot = false,
+ $redirect = false,
+ $redirect_match = false,
+ $protocol = 'http',
+ $aliases = false,
+ $server_alias = false,
+ $use = false,
+ $ticket = false,
+ $source = false,
+ $template = 'apache/site.erb',
+ $filename = '',
+ $manage_docroot = true,
+ $owner = 'root',
+ $group = 'root',
+ $mpm = true,
+ $mpm_user = '',
+ $mpm_group = '',
+ $password = '*',
+ $comment = '',
+ $sshkey = absent,
+ $groups = '',
+ $shell = '/bin/false',
+ $manage_user = true,
+ $ssl = false,
+ $listen = '*',
+ $https_redirect = false,
+ $canonical = false,
+ $canonical_exceptions = '',
+ $hidden_service = false,
+ $additional_directives = false
) {
$vhost = $filename ? {
diff --git a/templates/site.erb b/templates/site.erb
index 911d97a..aef58e0 100644
--- a/templates/site.erb
+++ b/templates/site.erb
@@ -32,6 +32,7 @@
RewriteCond %{HTTP_HOST} !=<%= canonical %> [NC]
RewriteCond %{HTTP_HOST} !=""
RewriteRule ^/(.*) <%= protocol %>://<%= canonical %>/$1 [L,R=301]
+<%- if additional_directives != false -%><%= additional_directives %><%- end -%>
<% end %>
</VirtualHost>
# end vhost for <%= title %>
@@ -49,6 +50,7 @@
<% if use != false %><% use.each do |instance| -%>
Use <%= instance %>
<% end -%><% end -%>
+<%- if additional_directives != false -%><%= additional_directives %><%- end -%>
<% if mpm == true %>
<IfModule mpm_itk_module>
AssignUserId <%= user %> <%= gid %>