It should be possible using the command
sudo /etc/init.d/apache2 reload
Answer from olly_uk on Stack Overflow$ /etc/init.d/httpd reload
This will run a config syntax check and then will make apache reload its config files without interrupting traffic.
Most linux distros have a small utility called apachectl or apache2ctl, which you can use to just reload the configuration. This will also activate any new virtual hosts.
The command you are looking for is
apache2ctl graceful
The main difference between the four different ways of stopping/restarting are what the main process does with its threads, and with itself.
Note that Apache recommends using apachectl -k as the command, and for systemd, the command is replaced by httpd -k
apachectl -k stop or httpd -k stop
This tells the process to kill all of its threads and then exit
apachectl -k graceful or httpd -k graceful
Apache will advise its threads to exit when idle, and then apache reloads the configuration (it doesn't exit itself), this means statistics are not reset.
apachectl -k restart or httpd -k restart
This is similar to stop, in that the process kills off its threads, but then the process reloads the configuration file, rather than killing itself.
apachectl -k graceful-stop or httpd -k graceful-stop
This acts like -k graceful but instead of reloading the configuration, it will stop responding to new requests and only live as long as old threads are around. Combining this with a new instance of httpd can be very powerful in having concurrent apaches running while updating configuration files.
Source: https://httpd.apache.org/docs/2.4/stopping.html
Recommendation: Use -k graceful unless there is something wrong with the main process itself, in which case a combination of -k stop and -k start or -k graceful-stop and -k start are the options of choice.
Difference between “restart” and “reload”
- Restart= stop + start
- Reload = remain running + re-read configuration files.
Normal restart and graceful restart, you can reference article:
https://teckadmin.wordpress.com/2013/10/23/difference-between-graceful-restart-and-normal-restart/