diff options
-rw-r--r-- | manifests/site.pp | 3 | ||||
-rw-r--r-- | templates/site.erb | 12 |
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 %> |