On Windows, Apache is normally run as a service on Windows NT, or as a console application on Windows 95. For details, see running Apache for Windows.
On Unix, the httpd
program is run as a daemon
which executes continuously in the background to handle requests.
A shell script called apachectl
is provided which
can be used to control the daemon process. This shell script
can often be used as an init script to start httpd
on system boot, or it can be called directly with the options
listed below.
If the Port specified in the configuration file is the default of 80, then it is necessary to have root privileges in order to start apache. If Apache will not start and no error messages are printed to the console, be sure to check the ErrorLog for a report of the problem. See also the debugging instructions outlined in the Apache FAQ.
start
httpd
. If
additional command line options need to be passed to
httpd
(see below), then the HTTPD
variable
at the top of the apachectl
script should be edited to
include them.stop
httpd
by issuing the kill signal to the
parent httpd
process, whose process ID is contained
in the file pointed to by the
PidFile directive.restart
httpd
if it is running by sending a
SIGHUP
signal to the parent process. If the server is not running, then
it will be started. apachectl
will refuse to
restart the server if there is a syntax error in the configuration
files (see configtest
below).graceful
httpd
if it is
running by sending a SIGWINCH
signal to the parent
process. This type of restart is less disruptive to current clients.
If the server is not running, then it will be
started. apachectl
will refuse to restart the server if
there is a syntax error in the configuration files.fullstatus
lynx
, and
for mod_status to be enabled.status
fullstatus
display.
This option requires the presence of lynx
, and
for mod_status to be enabled.configtest
httpd -t
command line option below.help
For additional information on the effects of the various
apachectl
options, see the documentation on stopping and restarting Apache.
-d
directory
/usr/local/apache
on Unix, /apache
on
Windows and /os2httpd
on OS/2.
-D
name
-f
file
/
, then it is taken to be a
path relative to the ServerRoot. The
default is conf/httpd.conf
.
-C
"directive"
-c
"directive"
-v
-V
-L
-l
-h
-t
-T
command instead.-t -D DUMP_VHOSTS
.-T
-R
directorySHARED_CORE
, then this
directive can be used to specify an alternate location for shared
object files.When Apache is used under Windows, the following additional command line options are available.
-n
name-k
option
-i
-u