ServerRoot "/usr/local/apache2"
================================
The ServerRoot directive sets the directory in which the server lives.In this case /usr/local/apache2 is the server root.
Listen 80
========
The Listen directive tells Apache to listen to only specific IP
addresses or ports. By default it responds to requests on all IP
interfaces.
Eg: Listen 192.168.1.53:80
Listen 80
LoadModule php5_module modules/libphp5.so
===============================================
Syntax: LoadModule module filename
The LoadModule directive links in the object file or library filename
and adds the module structure named module to the list of active
modules.
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
------------
</IfModule>
==============================
The <IfModule test>...</IfModule> section is used to
mark directives that are conditional on the presence of a specific
module.
ServerAdmin you@example.com
===========================
The ServerAdmin sets the contact address that the server includes in any error messages it returns to the client.
ServerName www.example.com:80
==============================
Syntax: ServerName fully-qualified-domain-name[:port]
The ServerName directive sets the hostname and port that the server uses to identify itself.
DocumentRoot "/usr/local/apache2/htdocs"
========================================
This directive sets the directory where the web documents are being served.
<Directory />
</Directory>
=====================
Enclose a group of directives that apply only to the named file-system
directory and
sub-directories
Syntax: <Directory directory-path> ... </Directory>
Options FollowSymLinks
=======================
The Options directive controls which server features are available in a particular directory.
All
All options except for MultiViews. This is the default setting.
ExecCGI
Execution of CGI scripts using mod_cgi is permitted.
FollowSymLinks
The server will follow symbolic links in this directory.
Even though the server follows the symlink it does
not change the pathname used to match against <Directory>
sections.
Includes
Server-side includes provided by mod_include are permitted.
IncludesNOEXEC
Server-side includes are permitted, but the #exec cmd and #exec cgi are disabled.
Indexes
If a URL which maps to a directory is requested, and
there is no DirectoryIndex (e.g., index.html) in that directory, then
mod_autoindex will return a formatted listing of the directory.
MultiViews
Content negotiated "MultiViews" are allowed using mod_negotiation.
SymLinksIfOwnerMatch
The server will only follow symbolic links for which
the target file or directory is owned by the same user id as the link.
AllowOverride None
=================
Description: Types of directives that are allowed in .htaccess files
Syntax: AllowOverride All|None|directive-type [directive-type] ..
AllowOverride is valid only in <Directory> sections
specified without regular expressions, not in <Location>,
<DirectoryMatch> or <Files> sections.
When this directive is set to None, then .htaccess files are completely
ignored. In this case, the server will not even attempt to read
.htaccess files in the filesystem.
When this directive is set to All, then any directive which has the .htaccess Context is allowed in .htaccess files.
AuthConfig
Allow use of the authorization directives
FileInfo
Allow use of the directives controlling document types
Indexes
Allow use of the directives controlling directory indexing
Limit
Allow use of the directives controlling host access
Options[=Option,...]
Allow use of the directives controlling specific directory features
DirectoryIndex index.html
========================
The DirectoryIndex directive sets the list of resources to look for,
when the client requests an index of the directory by specifying a / at
the end of the directory name.
Example
DirectoryIndex index.html
Then a request for http://myserver/docs/ would return
http://myserver/docs/index.html if it exists, or would list the
directory if it did not.
ErrorLog logs/error_log
=======================
Description: Location where the server will log errors
LogLevel warn
============
Description: Controls the verbosity of the ErrorLog
emerg Emergencies - system is unusable. "Child cannot open lock file. Exiting"
alert Action must be taken immediately. "getpwuid: couldn't determine user name from uid"
crit Critical Conditions. "socket: Failed to get a socket, exiting child"
error Error conditions. "Premature end of script headers"
warn Warning conditions. "child process 1234 did not exit, sending another SIGHUP"
notice Normal but significant condition.
"httpd: caught SIGBUS, attempting to dump core in
..."
info Informational. "Server seems
busy, (you may need to increase StartServers, or
Min/MaxSpareServers)..."
debug Debug-level messages "Opening config file ..."
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
=========================================================================
Describes a format for use in a log file
CustomLog logs/access_log common
================================
Description: Sets filename and format of log file
ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
=====================================================
Description: Maps a URL to a filesystem location and designates the target as a CGI script
DefaultType text/plain
=======================
Description: MIME content-type that will be sent if the server cannot determine a type in any other way
TypesConfig conf/mime.types
===============================
Description: The location of the mime.types file
AddType application/x-compress .Z
====================================
The AddType directive maps the given filename extensions onto the specified content type.
AddEncoding x-gzip .gz .tgz
==============================
The AddEncoding directive maps the given filename extensions to the specified encoding type
AddHandler cgi-script .cgi
==========================
Files having the name extension will be served by the specified handler-name.
AddOutputFilter INCLUDES .shtml
=================================
The AddOutputFilter directive maps the filename extension extension to
the filters which will process responses from the server before they
are sent to the client.
MIMEMagicFile conf/magic
=========================
he MimeMagicFile directive can be used to enable this module, the default file is distributed at conf/magic.
The MIMEMagicFile directive tells the module ' mod_mime_magic' where the hint definitions are located.
ErrorDocument
=============================================
In the event of a problem or error, Apache can be configured to do one of four things,
1. output a simple hardcoded error message
2. output a customized message
3. redirect to a local URL-path to handle the problem/error
4. redirect to an external URL to handle the problem/error
Syntax: ErrorDocument error-code document
EnableMMAP
=============
This directive controls whether the httpd may use memory-mapping if it needs to read the contents of a file during delivery.
Syntax: EnableMMAP On|Off
EnableSendfile
===============
This directive controls whether httpd may use the sendfile support from
the kernel to transmit file contents to the client. By default, when
the handling of a request requires no access to the data within a file
-- for example, when delivering a static file -- Apache uses sendfile
to deliver the file contents without ever reading the file if the OS
supports it
Syntax: EnableSendfile On|Off
Include
===========
This directive allows inclusion of other configuration files from within the server configuration files
running apachectl configtest will give you a list of the files that are being processed during the configuration check
Apache Module mod_ssl
=======================
This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server.
This module relies on OpenSSL to provide the cryptography engine.
SSLRandomSeed Directive
========================
This configures one or more sources for seeding the Pseudo Random
Number Generator (PRNG) in OpenSSL at startup time (context is startup)
and/or just before a new SSL connection is established (context is
connect). This directive can only be used in the global server context
because the PRNG is a global facility.
builtin : This is the always available builtin seeding source.
It's usage consumes minimum CPU cycles under runtime and hence can be
always used without drawbacks.