Kill and reload Apache, which then rereads all its Config files and
restarts:
% kill PID
% httpd [flags]
The same effect is achieved with less typing by using the
flag -HUP
to kill Apache:
% kill -HUP PID
A graceful restart is achieved with the flag
-USR1. This rereads the Config files
but lets the child processes run to completion, finishing any client
transactions in progress, before they are replaced with updated
children. In most cases, this is the best way to proceed, because it
won't interrupt people who are browsing at the time (unless you
messed up the Config files):
% kill -USR1 PID
A script to do the job automatically (assuming you are in the
server root directory when you run it) is as follows:
#!/bin/sh
kill -USR1 `cat logs/httpd.pid`