Skip to content

Commit e395f71

Browse files
jaymzhfacebook-github-bot
authored andcommitted
fb_apache: minor fixes (facebook#281)
Summary: * Recenty we added the knob to control `status.conf`, except that we didn't implement it in the verify_configs, so it was (1) testing the wrong thing and (2) making why-run lie * Add module-mapping for mod_proxy_http2 Signed-off-by: Phil Dibowitz <phil@ipom.com> Pull Request resolved: facebook#281 Differential Revision: D71135020 fbshipit-source-id: 6d0f214b7ae5433729a945f7ba55b9bee47f7d87
1 parent 1d3ab97 commit e395f71

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

cookbooks/fb_apache/attributes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
'proxy_fcgi' => 'mod_proxy_fcgi.so',
153153
'proxy_ftp' => 'mod_proxy_ftp.so',
154154
'proxy_http' => 'mod_proxy_http.so',
155+
'proxy_http2' => 'mod_proxy_http2.so',
155156
'proxy_scgi' => 'mod_proxy_scgi.so',
156157
'reqtimeout' => 'mod_reqtimeout.so',
157158
'rewrite' => 'mod_rewrite.so',

cookbooks/fb_apache/resources/verify_configs.rb

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,19 @@
8989
mode '0644'
9090
end.run_action(:create)
9191

92-
build_resource(:template,
93-
"#{tdir}/#{new_resource.confdir}/status.conf") do
94-
source 'status.erb'
95-
owner 'root'
96-
group 'root'
97-
mode '0644'
98-
variables(:location => '/server-status')
99-
end.run_action(:create)
92+
if node['fb_apache']['enable_public_status']
93+
build_resource(:template,
94+
"#{tdir}/#{new_resource.confdir}/status.conf") do
95+
source 'status.erb'
96+
owner 'root'
97+
group 'root'
98+
mode '0644'
99+
variables(:location => '/server-status')
100+
end.run_action(:create)
101+
else
102+
build_resource(:file, "#{tdir}/#{new_resource.confdir}/status.conf").
103+
run_action(:delete)
104+
end
100105

101106
verify_cmd = value_for_platform_family(
102107
'rhel' => "httpd -t -d #{tdir}",

0 commit comments

Comments
 (0)