Main Server Configuration
The main server configuration section of the configuration file sets up the main server, which responds to any requests that are not handled by a virtual host defined within a <VirtualHost>
container. Values here also provide defaults for any <VirtualHost>
containers defined.
The directives used in this section have changed little between Apache HTTP Server 1.3 and version 2.0. If the main server configuration is heavily customized, it may be easier to modify the existing configuration file to suit Apache HTTP Server 2.0. Users with only lightly customized main server sections should migrate their changes into the default 2.0 configuration.
The To enable to the following:
For more on this topic, refer to the following documentation on the Apache Software Foundation's website:
The following logging directives have been removed:
However, agent and referrer logs are still available using the For more on this topic, refer to the following documentation on the Apache Software Foundation's website:
The deprecated The The defaults for the For more on this topic, refer to the following documentation on the Apache Software Foundation's website:
The For more on this topic, refer to the following documentation on the Apache Software Foundation's website:
To use a hard-coded message with the For example, the following is a sample Apache HTTP Server 1.3 directive:
To migrate an Note the trailing double quote in the previous For more on this topic, refer to the following documentation on the Apache Software Foundation's website:
UserDir
MappingUserDir
directive is used to enable URLs such as http://example.com/~bob/
to map to a subdirectory within the home directory of the user bob
, such as /home/bob/public_html/
. A side-effect of this feature allows a potential attacker to determine whether a given username is present on the system. For this reason, the default configuration for Apache HTTP Server 2.0 disables this directive.
UserDir
mapping, change the directive in httpd.conf
from:
UserDir disable
UserDir
public_html
Logging
AgentLog
RefererLog
RefererIgnore
CustomLog
and LogFormat
directives.
Directory Indexing
FancyIndexing
directive has now been removed. The same functionality is available through the FancyIndexing
option within the IndexOptions
directive.
VersionSort
option to the IndexOptions
directive causes files containing version numbers to be sorted in a more natural way. For example, httpd-2.0.6.tar
appears before httpd-2.0.36.tar
in a directory index page.
ReadmeName
and HeaderName
directives have changed from README
and HEADER
to README.html
and HEADER.html
.
Content Negotiation
CacheNegotiatedDocs
directive now takes the argument on
or off
. Existing instances of CacheNegotiatedDocs
should be replaced with CacheNegotiatedDocs on
.
Error Documents
ErrorDocument
directive, the message should be enclosed in a pair of double quotation marks "
, rather than just preceded by a double quotation mark as required in Apache HTTP Server 1.3.
ErrorDocument 404 "The document was not found
ErrorDocument
setting to Apache HTTP Server 2.0, use the following structure:
ErrorDocument 404 "The document was not found"
ErrorDocument
directive example.