stopping.html revision 091caae3b2ebdb760c98575d0d5e349cd686f913
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens BGCOLOR="#FFFFFF"
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens TEXT="#000000"
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens LINK="#0000FF"
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens VLINK="#000080"
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens ALINK="#FF0000"
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<!--#include virtual="header.html" -->
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<H1 ALIGN="CENTER">Stopping and Restarting Apache</H1>
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<P>You will notice many <CODE>httpd</CODE> executables running on your system,
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensbut you should not send signals to any of them except the parent, whose
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrenspid is in the <A HREF="mod/core.html#pidfile">PidFile</A>. That is to
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrenssay you shouldn't ever need to send signals to any process except the
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensparent. There are three signals that you can send the parent:
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<CODE>TERM</CODE>, <CODE>HUP</CODE>, and <CODE>USR1</CODE>, which will
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensbe described in a moment.
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<P>To send a signal to the parent you should issue a command such as:
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens kill -TERM `cat /usr/local/apache/logs/httpd.pid`
78f171005391b928aaf1642b3206c534ed644332Matthew AhrensYou can read about its progress by issuing:
78f171005391b928aaf1642b3206c534ed644332Matthew AhrensModify those examples to match your
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<A HREF="mod/core.html#serverroot">ServerRoot</A> and
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<A HREF="mod/core.html#pidfile">PidFile</A> settings.
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<P>As of Apache 1.3 we provide a script <CODE>src/support/apachectl</CODE>
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrenswhich can be used to start, stop, and restart Apache. It may need a
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrenslittle customization for your system, see the comments at the top of
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrens<P>Sending the <CODE>TERM</CODE> signal to the parent causes it to
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensimmediately attempt to kill off all of its children. It may take it
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensseveral seconds to complete killing off its children. Then the
78f171005391b928aaf1642b3206c534ed644332Matthew Ahrensparent itself exits. Any requests in progress are terminated, and no
<!--#include virtual="footer.html" -->