When configuring Apache, some configuration options can be safely applied via a reload. Others require a full restart of the Apache process.
I have been unable to figure out which are which while reading the Apache docs. Nor have I found anything when searching the web.
So, which directives can be updated via a reload?
Which directives can only be updated via a restart?
See the directive quick reference for a list of all the directives.
Thanks for your help!
Edit: https://httpd.apache.org/docs/2.4/stopping.html doesn't list a reload. And I saw that the httpd.service file on CentOS 7 uses -k graceful for the reload command. Does that mean that a 'reload' on any OS is actually a graceful restart? Which would mean I could rely on a 'reload' to apply all my configuration changes safely.
graceful
will replace all children with a new ones running the new configuration. The parent does not exit. It can be used for all configuration file changes, but not an upgrade to the httpd binary.If you are concerned with the availability of a web server, put multiple of them behind a load balancer. Then you can do rolling restarts, and it will not matter if you use
graceful
orgraceful-stop
. AKA systemctlreload
orrestart
.reload
is a systemd command that is not named the same on all operating systems. Others use the kill signals in their own, platform specific, init scripts. Remember that httpd is portable runs on many things: UNIX (AIX, HP-UX, Solaris), not-UNIX (Linux), BSD, Windows, IBM i, z/OS.