Controlling httpd Lifecycle: Difference between revisions
Jump to navigation
Jump to search
(11 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
The lifecycle of the httpd server is controlled by sending Unix signals into the httpd parent process. | The lifecycle of the httpd server is controlled by sending Unix signals into the [[Httpd_Concepts#The_Parent_Process|httpd parent process]]. | ||
The signals can be sent into the parent process using the httpd process directly, using the -k command line | The signals can be sent into the parent process using the httpd process [[#Send_Signals_Directly_to_httpd|directly]], using the [[#Send_Commands_to_httpd_with_-k_Command_Line_Option|-k command line option]] or (recommended) the [[#Use_apachectl_Control_Script|<tt>apachectl</tt> control script]]. | ||
For more details about the httpd server lifecycle see: | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Httpd_Concepts#Server_Lifecycle|httpd Server Lifecycle]] | |||
</blockquote> | |||
=Use <tt>apachectl</tt> Control Script= | =Use <tt>apachectl</tt> Control Script= | ||
This is the recommended method to control the httpd server life cycle. | |||
<pre> | |||
apachectl -k stop|graceful|restart|graceful-stop | |||
</pre> | |||
=Send Signals Directly to httpd= | =Send Signals Directly to httpd= | ||
<pre> | |||
httpd -TERM|-USR1|-HUP|-WINCH $(cat /usr/local/apache2/logs/httpd.pid) | |||
</pre> | |||
=Send Commands to httpd with -k Command Line Option= | =Send Commands to httpd with -k Command Line Option= | ||
<pre> | |||
httpd -k stop|graceful|restart|graceful-stop | |||
</pre> |
Latest revision as of 20:26, 2 January 2017
Internal
Overview
The lifecycle of the httpd server is controlled by sending Unix signals into the httpd parent process.
The signals can be sent into the parent process using the httpd process directly, using the -k command line option or (recommended) the apachectl control script.
For more details about the httpd server lifecycle see:
Use apachectl Control Script
This is the recommended method to control the httpd server life cycle.
apachectl -k stop|graceful|restart|graceful-stop
Send Signals Directly to httpd
httpd -TERM|-USR1|-HUP|-WINCH $(cat /usr/local/apache2/logs/httpd.pid)
Send Commands to httpd with -k Command Line Option
httpd -k stop|graceful|restart|graceful-stop