diff --git a/modules/nodepool/files/nodepool-log.htaccess b/modules/nodepool/files/nodepool-log.htaccess
deleted file mode 100644
index 494e8a7abb..0000000000
--- a/modules/nodepool/files/nodepool-log.htaccess
+++ /dev/null
@@ -1,3 +0,0 @@
-
-AddOutputFilterByType DEFLATE text/text
-
\ No newline at end of file
diff --git a/modules/nodepool/manifests/init.pp b/modules/nodepool/manifests/init.pp
index ff268084bf..bc9ff26b2f 100644
--- a/modules/nodepool/manifests/init.pp
+++ b/modules/nodepool/manifests/init.pp
@@ -252,7 +252,8 @@ class nodepool (
apache::vhost { $vhost_name:
port => 80,
priority => '50',
- docroot => $image_log_document_root,
+ docroot => 'MEANINGLESS_ARGUMENT',
+ template => 'nodepool/nodepool-log.vhost.erb',
}
if $image_log_document_root != '/var/log/nodepool' {
@@ -267,17 +268,6 @@ class nodepool (
],
}
}
-
- # htaccess to enable the large .log files to send with gzip
- # compression
- file { "${image_log_document_root}/.htaccess":
- ensure => present,
- source => 'puppet:///modules/nodepool/nodepool-log.htaccess',
- mode => '0644',
- owner => 'nodepool',
- group => 'nodepool',
- require => File[$image_log_document_root],
- }
}
if $sudo == true {
diff --git a/modules/nodepool/templates/nodepool-log.vhost.erb b/modules/nodepool/templates/nodepool-log.vhost.erb
new file mode 100644
index 0000000000..a0e6fccb3f
--- /dev/null
+++ b/modules/nodepool/templates/nodepool-log.vhost.erb
@@ -0,0 +1,22 @@
+:80>
+
+ DocumentRoot <%= scope.lookupvar("nodepool:image_log_document_root") %>
+
+ Options <%= scope.lookupvar("apache::params::options") %>
+ AllowOverride None
+ Order allow,deny
+ allow from all
+
+
+ ErrorLog /var/log/<%= scope.lookupvar("apache::params::apache_name") %>/nodepool_error.log
+ LogLevel warn
+ CustomLog /var/log/<%= scope.lookupvar("apache::params::apache_name") %>/nodepool_access.log combined
+ ServerSignature Off
+
+ AddType text/plain .log
+
+
+ SetOutputFilter DEFLATE
+
+
+