Apache – How to Stop Gracefully on Ubuntu

Apache2linuxUbuntu

Is there a way to stop the Apache server without terminating executing requests, basically a way to tell it – don't accept any more connections and shut down when you finish your current ones?

Best Answer

Yes.

apachectl -k graceful-stop

https://httpd.apache.org/docs/2.4/stopping.html