1APACHECTL(8) apachectl APACHECTL(8)
2
3
4
6 apachectl - Apache HTTP Server Control Interface
7
8
10 When acting in pass-through mode, apachectl can take all the arguments
11 available for the httpd binary.
12
13
14 apachectl [ httpd-argument ]
15
16
17 When acting in SysV init mode, apachectl takes simple, one-word com‐
18 mands, defined below.
19
20
21 apachectl command
22
23
24
26 apachectl is a front end to the Apache HyperText Transfer Protocol
27 (HTTP) server. It is designed to help the administrator control the
28 functioning of the Apache httpd daemon.
29
30
31 The apachectl script can operate in two modes. First, it can act as a
32 simple front-end to the httpd command that simply sets any necessary
33 environment variables and then invokes httpd, passing through any com‐
34 mand line arguments. Second, apachectl can act as a SysV init script,
35 taking simple one-word arguments like start, restart, and stop, and
36 translating them into appropriate signals to httpd.
37
38
39 If your Apache installation uses non-standard paths, you will need to
40 edit the apachectl script to set the appropriate paths to the httpd
41 binary. You can also specify any necessary httpd command line argu‐
42 ments. See the comments in the script for details.
43
44
45 The apachectl script returns a 0 exit value on success, and >0 if an
46 error occurs. For more details, view the comments in the script.
47
48
49
51 Only the SysV init-style options are defined here. Other arguments are
52 defined on the httpd manual page.
53
54
55
56 start Start the Apache httpd daemon. Gives an error if it is already
57 running. This is equivalent to apachectl -k start.
58
59 stop Stops the Apache httpd daemon. This is equivalent to apachectl
60 -k stop.
61
62 restart
63 Restarts the Apache httpd daemon. If the daemon is not running,
64 it is started. This command automatically checks the configura‐
65 tion files as in configtest before initiating the restart to
66 make sure the daemon doesn't die. This is equivalent to
67 apachectl -k restart.
68
69 fullstatus
70 Displays a full status report from mod_status. For this to work,
71 you need to have mod_status enabled on your server and a text-
72 based browser such as lynx available on your system. The URL
73 used to access the status report can be set by editing the STA‐
74 TUSURL variable in the script.
75
76 status Displays a brief status report. Similar to the fullstatus
77 option, except that the list of requests currently being served
78 is omitted.
79
80 graceful
81 Gracefully restarts the Apache httpd daemon. If the daemon is
82 not running, it is started. This differs from a normal restart
83 in that currently open connections are not aborted. A side
84 effect is that old log files will not be closed immediately.
85 This means that if used in a log rotation script, a substantial
86 delay may be necessary to ensure that the old log files are
87 closed before processing them. This command automatically checks
88 the configuration files as in configtest before initiating the
89 restart to make sure Apache doesn't die. This is equivalent to
90 apachectl -k graceful.
91
92 graceful-stop
93 Gracefully stops the Apache httpd daemon. This differs from a
94 normal stop in that currently open connections are not aborted.
95 A side effect is that old log files will not be closed immedi‐
96 ately. This is equivalent to apachectl -k graceful-stop.
97
98 configtest
99 Run a configuration file syntax test. It parses the configura‐
100 tion files and either reports Syntax Ok or detailed information
101 about the particular syntax error. This is equivalent to
102 apachectl -t.
103
104
105 The following option was available in earlier versions but has been
106 removed.
107
108
109
110 startssl
111 To start httpd with SSL support, you should edit your configura‐
112 tion file to include the relevant directives and then use the
113 normal apachectl start.
114
115
116
117
118Apache HTTP Server 2018-07-06 APACHECTL(8)