Commands

Commands

The httpd command line options are as follows:

-dserverroot

Use this option to specify an initial value for the ServerRoot directive. Note that any conflicts between the value specified on the command line and the value specified in the configuration file will be resolved in favor of the configuration file. The following are the default values:

 

OS Type

Default ServerRoot

 

UNIX/

usr/local/apache

 

Windows

/apache

 

OS/2/

os2httpd

 

OS X

/Local/Library/Webserver

-Dname

Use this option to define a name that can later be used in IfDefine directives. IfDefine directives are used to conditionally enable or disable various features.

-fconfig_file

Use this directive to specify a file containing configuration directives. The file may be specified as either an absolute or relative path; the default is the httpd.conf file in the conf directory under ServerRoot.

-C "directive"

Use this option to tell Apache to run the specified directive before reading the configuration file(s).

-c"directive"

Use this option to tell Apache to run the specified directive after reading the configuration file(s).

-X

Use this option to run in single-process mode. This option is for internal debugging purposes only, as the daemon does not detach from the terminal or fork any children. Do NOT use this mode to provide ordinary Web service.

-v

Displays version information and exits.

-V

Displays the build date, base version, and some compile time options.

-L

Lists directives, their expected arguments, and a description of the expected context for that directive (Apache 1.3.4 and later).

-l

Displays all modules compiled into the server (versions 1.3.4 and later).

-l

Lists directives, their expected arguments, and a description of the expected context for that directive (versions 1.2 through 1.3.3).

-h

Displays command line options and exit (versions 1.3.4 and later).

-S

Displays the executable's interpretation of the vhost settings found in the config file, but does not start the server.

-t

This option is used for a thorough test mode. Reads and interprets the configuration file, but does not start the server. If the configuration file is properly formed, it will display "Syntax OK" and execute with a zero status. Otherwise, it displays error messages as appropriate and executes with a nonzero status. Note that this form of testing verifies that all DocumentRoot directories exist and are directories, which may be somewhat time consuming. For quicker checks use the -T option.

-T

This option is used when there is no need for quite so thorough a test mode. Reads and interprets the configuration files, but does not start the server. If the configuration file is properly formed, it will display "Syntax OK" and execute with a zero status. Otherwise, it displays error messages as appropriate and executes with a nonzero status. Does not check DocumentRoot entries. For more thorough checking use the -t option.

-koption

This option is used for Windows implementation only. Signals apache to either shutdown or to restart, depending on the value of the option (one of "shutdown" or "restart").

-?

Displays the command line options of httpd. Later versions use the -h option to do the same thing (versions less than or equal to 1.3.3).

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net