Skip to content

Commit

Permalink
add attribute and handling for preventing apache restarts after updat…
Browse files Browse the repository at this point in the history
…ing files
  • Loading branch information
kornface13 authored and mrichins committed May 10, 2023
1 parent d40b248 commit acb79ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cookbooks/fb_apache/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,5 @@
},
'mpm' => 'prefork',
}

node.default['fb_apache']['allow_restart'] = true
8 changes: 7 additions & 1 deletion cookbooks/fb_apache/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@
end
end

service 'apache_enable' do
service_name svc
action [:enable]
end

service 'apache' do
service_name svc
action [:enable, :start]
only_if { node['fb_apache']['allow_restart'] }
action [:nothing]
end
10 changes: 9 additions & 1 deletion cookbooks/fb_apache/templates/default/status.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<Location "<%= @location %>">
<Location /server-status>
SetHandler server-status
Require local
# vpn users
Require ip 10.96.244.0/22
# vpn users
Require ip 10.100.240.0/22
# GCP vpn users
Require ip 10.0.0.0/8
Require ip 127.0.0.1
</Location>

0 comments on commit acb79ea

Please sign in to comment.