|
1 class apache::mod::pagespeed ( |
|
2 $inherit_vhost_config = 'on', |
|
3 $filter_xhtml = false, |
|
4 $cache_path = '/var/cache/mod_pagespeed/', |
|
5 $log_dir = '/var/log/pagespeed', |
|
6 $memcache_servers = [], |
|
7 $rewrite_level = 'CoreFilters', |
|
8 $disable_filters = [], |
|
9 $enable_filters = [], |
|
10 $forbid_filters = [], |
|
11 $rewrite_deadline_per_flush_ms = 10, |
|
12 $additional_domains = undef, |
|
13 $file_cache_size_kb = 102400, |
|
14 $file_cache_clean_interval_ms = 3600000, |
|
15 $lru_cache_per_process = 1024, |
|
16 $lru_cache_byte_limit = 16384, |
|
17 $css_flatten_max_bytes = 2048, |
|
18 $css_inline_max_bytes = 2048, |
|
19 $css_image_inline_max_bytes = 2048, |
|
20 $image_inline_max_bytes = 2048, |
|
21 $js_inline_max_bytes = 2048, |
|
22 $css_outline_min_bytes = 3000, |
|
23 $js_outline_min_bytes = 3000, |
|
24 $inode_limit = 500000, |
|
25 $image_max_rewrites_at_once = 8, |
|
26 $num_rewrite_threads = 4, |
|
27 $num_expensive_rewrite_threads = 4, |
|
28 $collect_statistics = 'on', |
|
29 $statistics_logging = 'on', |
|
30 $allow_view_stats = [], |
|
31 $allow_pagespeed_console = [], |
|
32 $allow_pagespeed_message = [], |
|
33 $message_buffer_size = 100000, |
|
34 $additional_configuration = {}, |
|
35 $apache_version = $::apache::apache_version, |
|
36 ){ |
|
37 |
|
38 $_lib = $::apache::apache_version ? { |
|
39 '2.4' => 'mod_pagespeed_ap24.so', |
|
40 default => undef |
|
41 } |
|
42 |
|
43 apache::mod { 'pagespeed': |
|
44 lib => $_lib, |
|
45 } |
|
46 |
|
47 file { 'pagespeed.conf': |
|
48 ensure => file, |
|
49 path => "${::apache::mod_dir}/pagespeed.conf", |
|
50 content => template('apache/mod/pagespeed.conf.erb'), |
|
51 require => Exec["mkdir ${::apache::mod_dir}"], |
|
52 before => File[$::apache::mod_dir], |
|
53 notify => Class['apache::service'], |
|
54 } |
|
55 } |