|
28 | 28 | 'prefork' |
29 | 29 | end |
30 | 30 |
|
31 | | -default['apache']['version'] = |
32 | | - case node['platform_family'] |
33 | | - when 'debian' |
34 | | - case node['platform'] |
35 | | - when 'debian', 'raspbian' |
36 | | - node['platform_version'].to_f >= 8.0 ? '2.4' : '2.2' |
37 | | - else |
38 | | - '2.4' |
39 | | - end |
40 | | - when 'rhel' |
41 | | - case node['platform'] |
42 | | - when 'amazon' # This is for chef 12 compatibility |
43 | | - '2.4' |
44 | | - else |
45 | | - node['platform_version'].to_f >= 7.0 ? '2.4' : '2.2' |
46 | | - end |
47 | | - when 'suse' |
48 | | - node['platform_version'].to_f >= 12.1 ? '2.4' : '2.2' |
49 | | - else |
50 | | - '2.4' |
51 | | - end |
52 | | - |
53 | 31 | default['apache']['root_group'] = 'root' |
54 | 32 | default['apache']['default_site_name'] = 'default' |
55 | 33 |
|
|
76 | 54 | default['apache']['conf_dir'] = '/etc/httpd/conf' |
77 | 55 | default['apache']['docroot_dir'] = '/var/www/html' |
78 | 56 | default['apache']['cgibin_dir'] = '/var/www/cgi-bin' |
79 | | - default['apache']['icondir'] = |
80 | | - if node['apache']['version'] == '2.4' |
81 | | - '/usr/share/httpd/icons' |
82 | | - else |
83 | | - '/var/www/icons' |
84 | | - end |
| 57 | + default['apache']['icondir'] = '/usr/share/httpd/icons' |
85 | 58 | default['apache']['cache_dir'] = '/var/cache/httpd' |
86 | 59 | default['apache']['run_dir'] = '/var/run/httpd' |
87 | 60 | default['apache']['lock_dir'] = '/var/run/httpd' |
|
107 | 80 | default['apache']['cache_dir'] = '/var/cache/apache2' |
108 | 81 | default['apache']['run_dir'] = '/var/run/httpd' |
109 | 82 | default['apache']['lock_dir'] = '/var/run/httpd' |
110 | | - default['apache']['pid_file'] = |
111 | | - if node['platform_version'].to_f > 11.4 |
112 | | - '/var/run/httpd.pid' |
113 | | - else |
114 | | - '/var/run/httpd2.pid' |
115 | | - end |
| 83 | + default['apache']['pid_file'] = '/var/run/httpd2.pid' |
116 | 84 | default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? '/usr/lib/apache2' : '/usr/lib64/apache2' |
117 | 85 | default['apache']['libexec_dir'] = node['apache']['lib_dir'] |
118 | 86 | when 'debian' |
|
138 | 106 | default['apache']['cache_dir'] = '/var/cache/apache2' |
139 | 107 | default['apache']['run_dir'] = '/var/run/apache2' |
140 | 108 | default['apache']['lock_dir'] = '/var/lock/apache2' |
141 | | - # this should use COOK-3917 to educate the initscript of the pid location |
142 | | - if node['apache']['version'] == '2.4' |
143 | | - default['apache']['pid_file'] = '/var/run/apache2/apache2.pid' |
144 | | - default['apache']['docroot_dir'] = '/var/www/html' |
145 | | - else |
146 | | - default['apache']['pid_file'] = '/var/run/apache2.pid' |
147 | | - default['apache']['docroot_dir'] = '/var/www' |
148 | | - end |
| 109 | + default['apache']['pid_file'] = '/var/run/apache2/apache2.pid' |
| 110 | + default['apache']['docroot_dir'] = '/var/www/html' |
149 | 111 | default['apache']['lib_dir'] = '/usr/lib/apache2' |
150 | 112 | default['apache']['build_dir'] = '/usr/share/apache2' |
151 | 113 | default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules" |
|
301 | 263 | authz_host authz_user autoindex deflate dir env mime negotiation setenvif |
302 | 264 | ) |
303 | 265 |
|
304 | | -%w(log_config logio).each do |log_mod| |
| 266 | +%w(log_config logio unixd).each do |log_mod| |
305 | 267 | default['apache']['default_modules'] << log_mod if %w(rhel amazon fedora suse arch freebsd).include?(node['platform_family']) |
306 | 268 | end |
307 | 269 |
|
308 | | -if node['apache']['version'] == '2.4' |
309 | | - %w(unixd).each do |unix_mod| |
310 | | - default['apache']['default_modules'] << unix_mod if %w(rhel amazon fedora suse arch freebsd).include?(node['platform_family']) |
311 | | - end |
312 | | - |
313 | | - unless node['platform'] == 'amazon' # This is for chef 12 compatibility |
314 | | - default['apache']['default_modules'] << 'systemd' if %w(rhel fedora).include?(node['platform_family']) |
315 | | - end |
| 270 | +unless node['platform'] == 'amazon' # This is for chef 12 compatibility |
| 271 | + default['apache']['default_modules'] << 'systemd' if %w(rhel fedora).include?(node['platform_family']) |
316 | 272 | end |
0 commit comments