diff --git a/app/models/miq_server/environment_management.rb b/app/models/miq_server/environment_management.rb index 9c058a117a9..4c10dfa8b38 100644 --- a/app/models/miq_server/environment_management.rb +++ b/app/models/miq_server/environment_management.rb @@ -121,6 +121,10 @@ def restart_apache MiqApache::Control.restart(false) end + def start_apache + MiqApache::Control.start + end + def stop_apache MiqApache::Control.stop(false) end diff --git a/app/models/miq_server/worker_management/monitor.rb b/app/models/miq_server/worker_management/monitor.rb index f5a3830269e..10f44c057d2 100644 --- a/app/models/miq_server/worker_management/monitor.rb +++ b/app/models/miq_server/worker_management/monitor.rb @@ -148,7 +148,9 @@ def sync_needed? log_role_changes if roles_changed sync_active_roles if roles_changed set_active_role_flags if roles_changed + stop_apache if roles_changed && !apache_needed? + start_apache if roles_changed && apache_needed? reset_queue_messages if config_changed || roles_changed end