[ Team LiB ] |
Recipe 1.6 Starting, Stopping, and Restarting ApacheProblemYou want to be able to start and stop the server at need, using the appropriate tools. SolutionOn Unixish systems, use the apachectl script; on Windows, use the options in the Apache folder of the Start menu. DiscussionThe basic Apache package includes tools to make it easy to control the server. For Unixish systems, this is usually a script called apachectl, but prepackaged distributions may replace or rename it. It can only perform one action at a time, and the action is specified by the argument on the command line. The options of interest are:
For Windows, the MSI installation of Apache includes menu items for controlling the server, as shown in Figure 1-13. Figure 1-13. Using the Start menu to control ApacheBoth of the solutions shown (for Unixish and Windows systems) illustrate the basic server control operations: start, stop, and restart. The purpose of the start and stop functions should be self-evident. Any time you modify the server-wide configuration files (such as httpd.conf), you must restart the server for the changes to take effect. See Also |
[ Team LiB ] |