home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Book HomeApache: The Definitive GuideSearch this book

2.2. Apache's Flags

httpd (or apache) takes the following flags:

-D name

Defines a name for <IfDefine> directives.

-d directory

Specifies an alternate initial ServerRoot directory.

-f filename

Specifies an alternate ServerConfig file.

-C "directive"

Processes the given directive before reading Config file(s).

-c "directive"

Processes the given directive after reading Config file(s).


Shows version number.


Shows compile settings.


Lists available Config directives.


Lists compiled modules.


Shows parsed settings (currently only vhost).


Runs syntax test for configuration file(s).


Figure 2.2 Runs a single copy. This is intended for debugging only, and should not be used otherwise. Can cause a substantial delay in servicing requests.


Figure 2.2 Installs Apache as an NT service.


Figure 2.2 Uninstalls Apache as an NT service.


Figure 2.2 Under NT, prevents Apache registering itself as an NT service. If you are running under Win95 this flag does not seem essential, but it would be advisable to include it anyway. This flag should be used when starting Apache from the command line, but it is easy to forget because nothing goes wrong if you leave it out. The main advantage is a faster startup (omitting it causes a 30-second delay).

-k shutdown|restart

Figure 2.2 Run on another console window, apache -k shutdown stops Apache gracefully, and apache -k restart stops it and restarts it gracefully.

The Apache Group seems to put in extra flags quite often, so it is worth experimenting with apache -? (or httpd -?) to see what you get.

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.