summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-21 13:24:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-21 13:24:52 -0300
commit15314ee92924cd32df2c4671dcf17b5df38e3769 (patch)
treed112f7e043704b4573dc6cc0f3e77d372652c16b
parenta06881cafbf9d0c7f35e3d7c089f4dfc149d20db (diff)
downloadpuppet-apache-15314ee92924cd32df2c4671dcf17b5df38e3769.tar.gz
puppet-apache-15314ee92924cd32df2c4671dcf17b5df38e3769.tar.bz2
Adds custom_log, custom_log_format and error_log params at apache::site
-rw-r--r--manifests/site.pp3
-rw-r--r--templates/site.erb12
2 files changed, 15 insertions, 0 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index 63c97c8..e499ac9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -31,6 +31,9 @@ define apache::site(
$canonical = false,
$canonical_exceptions = '',
$hidden_service = false,
+ $error_log = false,
+ $custom_log = false,
+ $custom_log_format = 'anon',
$custom_directives = false,
$allow_override = false,
$hosting_domain = hiera('apache::site::domain', $::domain),
diff --git a/templates/site.erb b/templates/site.erb
index 20546f5..3bb32a2 100644
--- a/templates/site.erb
+++ b/templates/site.erb
@@ -33,6 +33,12 @@
<% if @custom_directives != false -%>
<%= @custom_directives %>
<% end -%>
+<% if @custom_log != false -%>
+ CustomLog "/var/log/apache2/<%= @name %>-access.log" <%= @custom_log_format %>
+<% end -%>
+<% if @error_log != false -%>
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+<% end -%>
<% if @allow_override != false %>
<Directory <%= @docroot %>>
AllowOverride <%= @allow_override %>
@@ -72,6 +78,12 @@
<% if @custom_directives != false -%>
<%= @custom_directives %>
<% end -%>
+<% if @custom_log != false -%>
+ CustomLog "/var/log/apache2/<%= @name %>-access.log" <%= @custom_log_format %>
+<% end -%>
+<% if @error_log != false -%>
+ ErrorLog /var/log/apache2/<%= @name %>-error.log
+<% end -%>
<% if @allow_override != false %>
<Directory <%= @docroot %>>
AllowOverride <%= @allow_override %>