httpd

Apache hypertext transfer protocol server

httpd [-X] [-R libexecdir] [ -d serverroot] [-f config] [ -C directive] [-c directive] [-D parameter]

httpd [-h] [-l] [-L] [-v] [-V] [-S] [-t] [-T]

sudo apachectl start|stop|restart

httpd may be invoked by the Internet daemon inetd(8) each time a connection to the HTTP service is made.

See the Apache manual .

-k start
  restart
  graceful
  stop
  graceful-stop
-e lvlError Log level
-E startupErrsFileerror messages during startup
-d serverroot Default /usr/local/apache2.
-f startCmdsFile Execute startCmdsFile on startup.
Default /usr/local/apache2/conf/httpd.conf.
-C directive Process before config
-c directive Process after config
-D parameter Sets a configuration parameter which can be used with <IfDefine>..</IfDefine> sections in the configuration files to conditionally skip or process commands.
-l list of modules compiled into the server.
-L list directives provided by statuc modules
-Mmap of loaded Static and Shared Modules.
-S Show virtualhost settings as parsed config
-t Run syntax tests for config
-T Skip document root check at startup/restart.
-X single-process debugging
-R libexecdir Overides ServerRoot only Apache built with SHARED_CORE
-v output version and exit.
-V output version and build parameters exit.
Server version: Apache/2.2.22 (Unix)
Server built:   Aug 24 2012 17:16:58
Server's Module Magic Number: 20051115:30
Server loaded:  APR 1.4.5, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FLOCK_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="/private/var/run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/private/var/run/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"

      
-h
 Usage: ./httpd [-D name] [-d directory] [-f file]
               [-C "directive"] [-c "directive"]
               [-k start|restart|graceful|graceful-stop|stop]
               [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]
Options:
  -D name            : define a name for use in  directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
  -S                 : a synonym for -t -D DUMP_VHOSTS
  -t -D DUMP_MODULES : show all loaded modules 
  -M                 : a synonym for -t -D DUMP_MODULES
  -t                 : run syntax check for config files
  -T                 : start without DocumentRoot(s) check

       

FILES

       /etc/httpd/httpd.conf
       /etc/httpd/srm.conf
       /etc/httpd/access.conf
       /etc/httpd/mime.types
       /etc/httpd/magic
       /var/log/httpd/error_log
       /var/log/httpd/access_log
       /var/run/httpd.pid

htpasswd generate passwords

.htaccess contains pointer to the password file.

.htpasswd is a frequent name.

See also

inetd

<Directory Container for directives affecting resources located in the specified directories
                     Allowed in *.conf only outside Directory, Files or Location
<Location Container for directives affecting resources accessed through the specified URL paths
                     Allowed in *.conf only outside Directory, Files or Location
<VirtualHost Container to map directives to a particular virtual host, takes one or more host addresses
                     Allowed in *.conf only outside Directory, Files or Location
<Files Container for directives affecting files matching specified patterns
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
<Limit Container for authentication directives when accessed using specified HTTP methods
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
<LimitExcept Container for authentication directives to be applied when any HTTP method other than those specified is used to access the resource
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
<IfModule Container for directives based on existance of specified modules
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
<IfDefine Container for directives based on existance of command line defines
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
<DirectoryMatch Container for directives affecting resources located in the specified directories
                     Allowed in *.conf only outside Directory, Files or Location
<LocationMatch Container for directives affecting resources accessed through the specified URL paths
                     Allowed in *.conf only outside Directory, Files or Location
<FilesMatch Container for directives affecting files matching specified patterns
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None

AuthType An HTTP authorization type (e.g., "Basic")
                     Allowed in *.conf only inside Directory, Files or Location and in .htaccess when AllowOverride includes AuthConfig
AuthName The authentication realm (e.g. "Members Only")
                     Allowed in *.conf only inside Directory, Files or Location and in .htaccess
                     when AllowOverride includes AuthConfig
Require Selects which authenticated users or groups may access a protected space
                     Allowed in *.conf only inside Directory, Files or Location and in .htaccess
                     when AllowOverride includes AuthConfig

Satisfy access policy if both allow and require used ('all' or 'any')
                     Allowed in *.conf only inside Directory, Files or Location and in .htaccess
                     when AllowOverride includes AuthConfig
AddDefaultCharset The name of the default charset to add to any Content-Type without one or 'Off' to disable
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
AcceptPathInfo Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
AccessFileName Name(s) of per-directory config files (default: .htaccess)
                     Allowed in *.conf only outside Directory, Files or Location
DocumentRoot Root directory of the document tree
                     Allowed in *.conf only outside Directory, Files or Location
ErrorDocument Change responses for HTTP errors
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
AllowOverride Controls what groups of directives can be configured by per-directory config files
                     Allowed in *.conf only inside Directory, Files or Location
Options Set a number of attributes for a given directory
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes Options
DefaultType the default MIME type for untypable files
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
FileETag Specify components used to construct a file's ETag
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
EnableMMAP Controls whether memory-mapping may be used to read files
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
EnableSendfile Controls whether sendfile may be used to transmit files
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
Protocol Set the Protocol for httpd to use. Allowed in *.conf only outside Directory, Files or Location
AcceptFilter Set the Accept Filter to use for a protocol Allowed in *.conf only outside Directory, Files or Location
Port Port was replaced with Listen in Apache 2.0 Allowed in *.conf only outside Directory, Files or Location
HostnameLookups one | off reverse DNS lookups, or double to enable double-reverse DNS lookups Allowed in *.conf anywhere
ServerAdmin The email address of the server administrator. Allowed in *.conf only outside Directory, Files or Location
ServerName The hostname and port of the server. Allowed in *.conf only outside Directory, Files or Location
ServerSignature En-/disable server signature (on|off|email)
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
ServerRoot Common directory of server-related files (logs, confs, etc.). Allowed in *.conf only outside Directory, Files or Location
ErrorLog The filename of the error log. Allowed in *.conf only outside Directory, Files or Location
ServerAlias A name or names alternately used to access the server
                     Allowed in *.conf only outside Directory, Files or Location
ServerPath The pathname the server can be reached at
                     Allowed in *.conf only outside Directory, Files or Location
Timeout Timeout duration (sec)
                     Allowed in *.conf only outside Directory, Files or Location
ContentDigest whether or not to send a Content-MD5 header with each request Allowed in *.conf anywhere and in .htaccess when AllowOverride includes Options
UseCanonicalName How to work out the ServerName : Port when constructing URLs Allowed in *.conf anywhere
UseCanonicalPhysicalPort Whether to use the physical Port when constructing URLs. Allowed in *.conf anywhere
Include Name of the config file to be included. Allowed in *.conf anywhere
LogLevel Level of verbosity in error logging
                     Allowed in *.conf only outside Directory, Files or Location
NameVirtualHost A numeric IP address:port, or the name of a host
                     Allowed in *.conf only outside Directory, Files or Location
ServerTokens Determine tokens displayed in the Server: header - Min(imal), OS or Full
                     Allowed in *.conf only outside Directory, Files or Location
LimitRequestLine Limit on maximum size of an HTTP request line
                     Allowed in *.conf only outside Directory, Files or Location
LimitRequestFieldsize Limit on maximum size of an HTTP request header field
LimitRequestFields Limit (0 = unlimited) on max number of header fields in a request message

LimitRequestBody Limit (in bytes) on maximum size of request message body
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
LimitXMLRequestBody Limit (in bytes) on maximum size of an XML-based request body

MaxRanges Maximum number of Ranges in a request before returning the entire resource, or 0 for unlimited
                     Allowed in *.conf anywhere
RLimitCPU Soft/hard limits for max CPU usage in seconds
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride isn't None
RLimitMEM Soft/hard limits for max memory usage per process
RLimitNPROC soft/hard limits for max number of processes per uid
LimitInternalRecursion maximum recursion depth of internal redirects and subrequests
                     Allowed in *.conf only outside Directory, Files or Location

ForceType a mime type that overrides other configured type
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
SetHandler a handler name that overrides any other configured handler
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
SetOutputFilter filter (or ; delimited list of filters) to be run on the request content
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
SetInputFilter filter (or ; delimited list of filters) to be run on the request body
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
AddOutputFilterByType output filter name followed by one or more content-types
                     Allowed in *.conf anywhere and in .htaccess when AllowOverride includes FileInfo
AllowEncodedSlashes Allow URLs containing '/' encoded as '%2F'
                     Allowed in *.conf only outside Directory, Files or Location
PidFile A file for logging the server process ID
                     Allowed in *.conf only outside Directory, Files or Location
ScoreBoardFile A file for Apache to maintain runtime process management information
                     Allowed in *.conf only outside Directory, Files or Location
LockFile The lockfile used when Apache needs to lock the accept() call
                     Allowed in *.conf only outside Directory, Files or Location
MaxRequestsPerChild Maximum number of requests a particular child serves before dying.
                     Allowed in *.conf only outside Directory, Files or Location
CoreDumpDirectory The location of the directory Apache changes to before dumping core
                     Allowed in *.conf only outside Directory, Files or Location
AcceptMutex Valid accept mutexes for this platform and MPM are: default, flock, fcntl, sysvsem, posixsem, pthread.
                     Allowed in *.conf only outside Directory, Files or Location
MaxMemFree Maximum number of 1k blocks a particular childs allocator may hold.
                     Allowed in *.conf only outside Directory, Files or Location
ThreadStackSize Size in bytes of stack used by threads handling client connections
                     Allowed in *.conf only outside Directory, Files or Location
TraceEnable 'on' (default), 'off' or 'extended' to trace request body content
                     Allowed in *.conf only outside Directory, Files or Location
Suexec Enable or disable suEXEC support
                     Allowed in *.conf only outside Directory, Files or Location
CustomLog a file name, a custom log format string or format name, and an optional "env=" clause (see docs)
                     Allowed in *.conf only outside Directory, Files or Location
TransferLog the filename of the access log
                     Allowed in *.conf only outside Directory, Files or Location
LogFormat a log format string (see docs) and an optional format name
                     Allowed in *.conf only outside Directory, Files or Location
CookieLog the filename of the cookie log
                     Allowed in *.conf only outside Directory, Files or Location
BufferedLogs Enable Buffered Logging (experimental)
                     Allowed in *.conf only outside Directory, Files or Location
<IfVersion (mod_version.c) a comparison operator, a version (and a delimiter)
                     Allowed in *.conf anywhere [no per-dir config] and in .htaccess when AllowOverride isn't None
User Effective user id for this server
                     Allowed in *.conf only outside Directory, Files or Location
Group Effective group id for this server
                     Allowed in *.conf only outside Directory, Files or Location
ChrootDir The directory to chroot(2) into
                     Allowed in *.conf only outside Directory, Files or Location
ListenBacklog Maximum length of the queue of pending connections, as used by listen(2)
                     Allowed in *.conf only outside Directory, Files or Location
Listen A port number or a numeric IP address and a port number, and an optional protocol
                     Allowed in *.conf only outside Directory, Files or Location
SendBufferSize Send buffer size in bytes
                     Allowed in *.conf only outside Directory, Files or Location
ReceiveBufferSize Receive buffer size in bytes
                     Allowed in *.conf only outside Directory, Files or Location
StartServers Number of child processes launched at server startup
                     Allowed in *.conf only outside Directory, Files or Location
MinSpareThreads Minimum number of idle threads, to handle request spikes
                     Allowed in *.conf only outside Directory, Files or Location
MaxSpareThreads Maximum number of idle threads
                     Allowed in *.conf only outside Directory, Files or Location
MaxClients Maximum number of threads alive at the same time
                     Allowed in *.conf only outside Directory, Files or Location
ThreadsPerChild Number of threads each child creates
                     Allowed in *.conf only outside Directory, Files or Location
ServerLimit Maximum number of child processes for this run of Apache
                     Allowed in *.conf only outside Directory, Files or Location
ThreadLimit Maximum number of worker threads per child process for this run of Apache - Upper limit for ThreadsPerChild
                     Allowed in *.conf only outside Directory, Files or Location
KeepAliveTimeout (http_core.c) Keep-Alive timeout duration (sec)
                     Allowed in *.conf only outside Directory, Files or Location
MaxKeepAliveRequests (http_core.c) Maximum number of Keep-Alive requests per connection.
                     Allowed in *.conf only outside Directory, Files or Location
KeepAlive persistent connections should be On or Of.f Allowed in *.conf only outside Directory, Files or Location

LoadModule module and shared object file to load it from
                     Allowed in *.conf only outside Directory, Files or Location
LoadFile shared object file or library to load at runtime
                     Allowed in *.conf only outside Directory, Files or Location

GracefulShutdownTimeout seconds to wait for child processes during shutdown
                     Allowed in *.conf only outside Directory, Files or Location

starting apache under Mac OS X
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

See

lighttpd.