Apache Configuration - VasilyF/rocks GitHub Wiki
This document gives an overview of configuration directives used in the general Apache configuration file as well as the corresponding module that uses the directive.
Enclose directives that only apply to the directory and its recursive contents
module: core
Enclose directives that only apply to the files that match the regex.
module: core
Enclose directives that only apply for requests destined for a particular host. Essentially, configuration for a server dedicated for a particular application but in actuality runs on a single server instance that could potentially also serve other applications.
module: core
Directives are only invoked if module is present, {module} is either the module identifier or the mod_example.c file containing STANDARD20_MODULE_STUFF that gets compiled into the module.
module: core
Name of file containing directory-wide configurations. When serving content apache will look through each directory along the path and execute the config files if it finds them (avoid using this - put configurations in the existing relevant apache config files).
Determines which directives in .htaccess files can override pre-established directives. None - .htaccess files completely ignored.
Directory where server will create runtime files (shared memory, locks).
Root directory of content served by server. URLs that map directly to server resources are relative to this directory.
File where errors are logged if ErrorLog unspecified in virtual host.
Do not allow reverse DNS lookup in order to use hostname in logs.
Includes configurations in other files (not currently used - configurations combined into one file).
Allow persistent TCP connection (session) to be used to send multiple requests.
Seconds to wait for new request on persistent connection before closing connection
Severity of messages to insert into log file
Limits number of requests allowed per persistent connection. 0 for unlimited.
- FollowSymLinks - the server will follow sym links within this directory
- Indexes - if directory URL requested, in the absence of a directory index.html file (or file specified by DirectoryIndex) then return a page of the directory contents (useful for dev - turn off)
Hostname/port server uses to identify itself, no port specified means will use port from incoming request.
Directory of server, has subdirectories conf/ and logs/ relative paths are with respect to ServerRoot.
Amount of time to wait for IO - time to wait for TCP packet to arrive, time to wait for an acknowledgement of packet from the client.
Hostname/port on which to accept incoming requests
file to which server records the process id of the daemon.
Unix group ID apache lower-privilege user belongs to.
Unix user ID as which apache will handle requests. Upon startup apache uses root privileges and then demotes to lower- privilege user to process requests.
Specifies log file for server access logs and log format to use (declared previously).
Specifies a format for error message logging. This format can be referenced through . See the official documentation.
Tests whether authenticated user authorized according to authorization provider and restrictions. Generic authorization providers included with the module:
- all granted - unconditional access
- all denied - unconditional denial of access
Authorization based on host.
Control of URLs of incoming requests, mapping URL to filesystem resources, redirects - asking client to fetch different URL.
Basic HTTP authentication.
Core authentication capabilities, directives common to all authentication providers.
User authentication by looking up users in plain text password files.
Core authorization capabilities.
Authorization based on host address.
Authorization based on user.
Generates directory indexes automatically - a page listing the files in the directory.
Provides compression of content before it is sent to the client.
Serving of directory index files.
Modifies environment variables passed to CGI script
Allows context-dependent (smart) application of filters.
Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding).
Multi-processing module handling the strategy with which the server handles requests regarding process forking and threading.
Provides content negotiation (media type, language, character set, encoding).
Enable interpreting for .php files.
Control the minimum rate of data flow on a connection and timeout on idle requests before closing.
Allows setting environment variables based on characteristics of request (ie. browser, host address).
Provides server status information about activity and performance.
- DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm -> mod_dir
- LoadModule
- TypesConfig
- AddType
- RemoveType
- AddLanguage
- AddCharset
- AddHandler
- SetHandler
- AddOutputFilter
- ExtendedStatus
- ProxyStatus
- php_admin_flag
- AddOutputFilterByType
- BrowserMatch
- IndexOptions
- AddIconByEncoding
- AddIconByType
- AddIcon
- DefaultIcon
- ReadmeName
- HeaderName
- IndexIgnore
- RequestReadTimeout
- LanguagePriority
- ForceLanguagePriority
- StartServers
- MinSpareServers
- MaxSpareServers
- MaxRequestWorkers
- MaxConnectionsPerChild