MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/3/root/proc/2/task/2/root/proc/self/root/usr/share/doc/httpd-2.2.3/migration.html
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Apache Migration HOWTO</title><link rel="stylesheet" href="migration.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><meta name="description" content="This HOWTO covers the migration of CentOS Enterprise Linux web servers from
Apache 1.3 packages to Apache 2.0 packages.  It
explains the relevant differences between the 1.3 and 2.0 packages,
and describes the process required to migrate your server's
configuration from 1.3 to 2.0."></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id2583845"></a>Apache Migration HOWTO</h1></div><div><div class="abstract"><p class="title"><b>Abstract</b></p><p>This HOWTO covers the migration of CentOS Enterprise Linux web servers from
Apache 1.3 packages to Apache 2.0 packages.  It
explains the relevant differences between the 1.3 and 2.0 packages,
and describes the process required to migrate your server's
configuration from 1.3 to 2.0.</p></div></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#id2619341">1. Naming and filesystem changes</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2619324">1.1. Packaging changes</a></span></dt><dt><span class="sect2"><a href="#id2619416">1.2. Filesystem changes</a></span></dt></dl></dd><dt><span class="sect1"><a href="#id2583626">2. Migrating your configuration</a></span></dt><dd><dl><dt><span class="sect2"><a href="#id2583454">2.1. Global Environment</a></span></dt><dt><span class="sect2"><a href="#mainserverconfig">2.2. Main server configuration</a></span></dt><dt><span class="sect2"><a href="#id2628757">2.3. Virtual Hosts</a></span></dt><dt><span class="sect2"><a href="#modules">2.4. Modules</a></span></dt></dl></dd><dt><span class="appendix"><a href="#pkgchanges">A. Packaging Changes</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2619341"></a>1. Naming and filesystem changes</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2619324"></a>1.1. Packaging changes</h3></div></div></div><p>When using RPM to administer your system you should be aware
that some packages have been renamed, some have been incorporated into
others, and some have been deprecated.  The major changes are that the
<code class="literal">apache</code>, <code class="literal">apache-devel</code> and
<code class="literal">apache-manual</code> packages have been renamed as
<code class="literal">httpd</code>, <code class="literal">httpd-devel</code> and
<code class="literal">httpd-manual</code>, and that the
<code class="literal">mod_dav</code> package has been incorporated into the
<code class="literal">httpd</code> package.</p><p>A complete breakdown of the packaging changes can be found in
<a href="#pkgchanges" title="A. Packaging Changes">Appendix A, <i>Packaging Changes</i></a>.</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2619416"></a>1.2. Filesystem changes</h3></div></div></div><p>The single major change to the filesystem layout is that there
is now a directory, <code class="filename">/etc/httpd/conf.d</code>, into which
the configuration files for individually packaged modules (<code class="literal">mod_ssl</code>,
<code class="literal">php</code>, <code class="literal">mod_perl</code> and so on) are placed.  The server
is instructed to load configuration files from this location by the
directive <code class="literal">Include conf.d/*.conf</code> within
<code class="filename">/etc/httpd/conf/httpd.conf</code>, so it is vital that
this line be inserted when migrating an existing configuration.</p><p>Of the many minor changes, the most important to be aware of are
that the utility programs <span><strong class="command">ab</strong></span> and
<span><strong class="command">logresolve</strong></span> have been moved from
<code class="filename">/usr/sbin</code> to <code class="filename">/usr/bin</code>, which
will cause scripts with absolute paths to these binaries to fail; the
<span><strong class="command">dbmmanage</strong></span> command has been replaced by <span><strong class="command">htdbm</strong></span> (see <a href="#mod_auth_dbm" title="2.4.4. mod_auth_dbm and mod_auth_db">Section 2.4.4, &#8220;mod_auth_dbm and mod_auth_db&#8221;</a>); the logrotate configuration file has been
renamed from <code class="filename">/etc/logrotate.d/apache</code> to
<code class="filename">/etc/logrotate.d/httpd</code>.</p></div></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2583626"></a>2. Migrating your configuration</h2></div></div></div><p>If you have upgraded your server from a previous version of 
CentOS Enterprise Linux upon which Apache was installed then the stock configuration
file from the Apache 2.0 package will have been created as
<code class="filename">/etc/httpd/conf/httpd.conf.rpmnew</code>, leaving your
original <code class="filename">httpd.conf</code> untouched.  It is, of course, entirely up to you
whether you use the new configuration file and migrate your old
settings to it, or use your existing file as a base and modify it to
suit, however some parts of the file have changed more than others and
a mixed approach is generally the best.  The stock configuration files
for both 1.3 and 2.0 are divided into three sections, and for each of
these this document will suggest what is hopefully the easiest
route.</p><p>If your <code class="filename">httpd.conf</code> has been modified from the default configuration
and you have saved a copy of the original then you may find the
<span><strong class="command">diff</strong></span> command comes in handy.  Invoked as:

</p><div class="informalexample"><pre class="programlisting">
diff -u httpd.conf.orig httpd.conf | less
</pre></div><p>

for example, it will highlight the modifications you have made.  If
you do not have a copy of the original file all is not lost, since it
is possible to extract it from an RPM package using the
<span><strong class="command">rpm2cpio</strong></span> and <span><strong class="command">cpio</strong></span> commands, for
example:

</p><div class="informalexample"><pre class="programlisting">
rpm2cpio apache-1.3.23-11.i386.rpm | cpio -i --make
</pre></div><p>

Finally, it is useful to know that Apache has a testing mode to check
your configuration for errors.  This may be invoked as:

</p><div class="informalexample"><pre class="programlisting">
apachectl configtest
</pre></div><p>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2583454"></a>2.1. Global Environment</h3></div></div></div><p>The global environment section of the configuration file
contains directives which affect the overall operation of Apache, such
as the number of concurrent requests it can handle and the locations of
the various files it uses.  This section requires a large number of
changes compared with the others and it is therefore recommended that
you base this section on the Apache 2.0 configuration file and migrate
your old settings into it.</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2583470"></a>2.1.1. Selecting which interfaces and ports to bind to</h4></div></div></div><p>The <code class="literal">BindAddress</code> and <code class="literal">Port</code>
directives no longer exist: their functionality is now provided by a
more flexible <code class="literal">Listen</code> directive.</p><p>If you had set <code class="literal">Port 80</code> you should change it
to <code class="literal">Listen 80</code> instead.  If you had set
<code class="literal">Port</code> to some other value then you should also
append the port number to the contents of your
<code class="literal">ServerName</code> directive:</p><div class="example"><a name="id2583529"></a><p class="title"><b>Example 1. Apache 1.3 port configuration</b></p><pre class="programlisting">
Port 123
ServerName www.example.com
</pre></div><div class="example"><a name="id2583541"></a><p class="title"><b>Example 2. Equivalent Apache 2.0 port configuration</b></p><pre class="programlisting">
<span class="bold"><strong>Listen</strong></span> 123
ServerName www.example.com<span class="bold"><strong>:123</strong></span>
</pre></div><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mpm_common.html#listen" target="_top"><code class="literal">Listen</code></a></li><li><a href="http://httpd.apache.org/docs-2.0/mod/core.html#servername" target="_top"><code class="literal">ServerName</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2585143"></a>2.1.2. Server-pool size regulation</h4></div></div></div><p>In Apache 2.0, the responsibility for accepting requests and
dispatching children to handle them has been abstracted into a group
of modules called Multi-Processing Modules (MPMs); the original Apache
1.3 behaviour has now been moved into the <span class="emphasis"><em>prefork</em></span> MPM.</p><p>The MPM used by default on CentOS Enterprise Linux is <span class="emphasis"><em>prefork</em></span> which
accepts the same directives (<code class="literal">StartServers</code>,
<code class="literal">MinSpareServers</code>,
<code class="literal">MaxSpareServers</code>, <code class="literal">MaxClients</code> and
<code class="literal">MaxRequestsPerChild</code>) as Apache 1.3 and as such the
values of these directives may be migrated across directly.</p><p>An alternative, thread-based MPM called <span class="emphasis"><em>worker</em></span> is also available;
to use this MPM, add the line:

</p><div class="informalexample"><pre class="programlisting">
HTTPD=/usr/sbin/httpd.worker
</pre></div><p>

to the file <code class="filename">/etc/sysconfig/httpd</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mpm.html" target="_top">Apache
Multi-Processing Modules</a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="dsosupport"></a>2.1.3. Dynamic Shared Object (DSO) Support</h4></div></div></div><p>There are many changes required here and it is highly
recommended that anyone trying to modify an Apache 1.3 configuration
to suit Apache 2.0 (as opposed to migrating your changes into the
Apache 2.0 configuration) simply copy this section from the stock 
CentOS Enterprise Linux Apache 2.0 configuration.  If you do decide to try and
modify your original file, please note that it is of paramount
importance that your <code class="filename">httpd.conf</code> contains the following directive:

</p><div class="informalexample"><pre class="programlisting">
#
# Load config files from the config directory "/etc/httpd/conf.d".
#
Include conf.d/*.conf
</pre></div><p>

Omission of this directive will result in the failure of all modules
packaged in their own RPMs (<code class="literal">mod_ssl</code>, <code class="literal">php</code>,
<code class="literal">mod_perl</code> and the like).</p><p>Those who still don't want to simply copy the section from the
stock Apache 2.0 configuration should note the following:</p><div class="itemizedlist"><ul type="disc"><li><p>The <code class="literal">AddModule</code> and
<code class="literal">ClearModuleList</code> directives no longer exist. These
directives where used to ensure that modules could be enabled in the
correct order. The new Apache 2.0 API allows modules to explicitly
specify their ordering, eliminating the need for these
directives.</p></li><li><p>The order of the <code class="literal">LoadModule</code> lines
is thus no longer relevant.</p></li><li><p>Many modules have been added, removed, renamed, split
up, or incorporated with each other.</p></li><li><p><code class="literal">LoadModule</code> lines for modules
packaged in their own RPMs (<code class="literal">mod_ssl</code>, <code class="literal">php</code>,
<code class="literal">mod_perl</code> and the like) are no longer necessary as they can be found
in the relevant file in the directory
<code class="filename">/etc/httpd/conf.d</code>.</p></li><li><p>The various <code class="literal">HAVE_XXX</code> definitions
are no longer defined.</p></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2583943"></a>2.1.4. Other changes</h4></div></div></div><p>The <code class="literal">ServerType</code> directive has been removed in
Apache 2.0 which can only be run as <code class="literal">ServerType
standalone</code>.</p><p>The <code class="literal">AccessConfig</code> and
<code class="literal">ResourceConfig</code> directives have been removed since
they mirror the functionality of the <code class="literal">Include</code>
directive.  If you have <code class="literal">AccessConfig</code> and
<code class="literal">ResourceConfig</code> directives set then you need to
replace these with <code class="literal">Include</code> directives.  To ensure
that the files are read in the order implied by the older directives
the <code class="literal">Include</code> directives should be placed at the end
of <code class="filename">httpd.conf</code>, with the one corresponding to
<code class="literal">ResourceConfig</code> preceding the one corresponding to
<code class="literal">AccessConfig</code>.  If you were making use of the
default values you will need to include them explicitly as
<code class="filename">conf/srm.conf</code> and
<code class="filename">conf/access.conf</code>.</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="mainserverconfig"></a>2.2. Main server configuration</h3></div></div></div><p>The main server configuration section of the configuration file
sets up the main server, which responds to any requests that aren't
handled by a <code class="literal">&lt;VirtualHost&gt;</code> definition.
Values here also provide defaults for any
<code class="literal">&lt;VirtualHost&gt;</code> containers you may
define.</p><p>The directives used in this section have changed little between
Apache 1.3 and Apache 2.0, so if your main server configuration is
heavily customised you may find it easier to modify your existing
configuration to suit Apache 2.0.  Users with only lightly customised
main server sections are recommended to migrate their changes into the
stock Apache 2.0 configuration.</p><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2584089"></a>2.2.1. UserDir mapping</h4></div></div></div><p>The <code class="literal">UserDir</code> directive is used to enable URLs
such as <code class="filename">http://example.com/~jim/</code> to map to a
directory in the home directory of the user <code class="literal">jim</code>,
such as <code class="filename">/home/jim/public_html</code>.  A side-effect of
this feature allows a potential attacker to determine whether a given
username is present on the system, so the default configuration for
Apache 2.0 does not enable <code class="literal">UserDir</code>.</p><p>To enable <code class="literal">UserDir</code> mapping, change the
directive: 
</p><div class="informalexample"><pre class="programlisting">
UserDir disable
</pre></div><p> 
to
</p><div class="informalexample"><pre class="programlisting">
UserDir public_html
</pre></div><p> 
in <code class="filename">/etc/httpd/conf/httpd.conf</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_userdir.html#userdir" target="_top"><code class="literal">UserDir</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628361"></a>2.2.2. Logging</h4></div></div></div><p>The <code class="literal">AgentLog</code>, <code class="literal">RefererLog</code>
and <code class="literal">RefererIgnore</code> directives have been removed.
Agent and referrer logs are still available using the
<code class="literal">CustomLog</code> and <code class="literal">LogFormat</code>
directives.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog" target="_top"><code class="literal">CustomLog</code></a></li><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#logformat" target="_top"><code class="literal">LogFormat</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628432"></a>2.2.3. Directory Indexing</h4></div></div></div><p>The deprecated <code class="literal">FancyIndexing</code> directive has
now been removed. The same functionality is available through the
<code class="literal">FancyIndexing</code> option to the
<code class="literal">IndexOptions</code> directive.</p><p>The new <code class="literal">VersionSort</code> option to the
<code class="literal">IndexOptions</code> directive causes files containing
version numbers to be sorted in the natural way, so that
<code class="filename">apache-1.3.9.tar</code> would appear before
<code class="filename">apache-1.3.12.tar</code> in a directory index page.</p><p>The defaults for the <code class="literal">ReadmeName</code> and
<code class="literal">HeaderName</code> directives have changed from
<code class="filename">README</code> and <code class="filename">HEADER</code> to
<code class="filename">README.html</code> and
<code class="filename">HEADER.html</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#indexoptions" target="_top"><code class="literal">IndexOptions</code></a></li><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#readmename" target="_top"><code class="literal">ReadmeName</code></a></li><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#headername" target="_top"><code class="literal">HeaderName</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628574"></a>2.2.4. Content Negotiation</h4></div></div></div><p>The <code class="literal">CacheNegotiatedDocs</code> directive now takes
the argument: on or off. Existing instances of
<code class="literal">CacheNegotiatedDocs</code> should be replaced with
<code class="literal">CacheNegotiatedDocs on</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_negotiation.html#cachenegotiateddocs" target="_top"><code class="literal">CacheNegotiatedDocs</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628622"></a>2.2.5. Error Documents</h4></div></div></div><p>To use a hard-coded message with the
<code class="literal">ErrorDocument</code> directive, the message should be
enclosed in a pair of double quotes, rather than just preceded by a
double quote as required in Apache 1.3.  For instance, change:

</p><div class="informalexample"><pre class="programlisting">
ErrorDocument 404 "The document was not found
</pre></div><p> 
to
</p><div class="informalexample"><pre class="programlisting">
ErrorDocument 404 "The document was not found<span class="bold"><strong>"</strong></span>
</pre></div><p>

</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/core.html#errordocument" target="_top"><code class="literal">ErrorDocument</code></a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628689"></a>2.2.6. Default Character Set</h4></div></div></div><p>The default character set which will be sent in a
<code class="literal">Content-Type</code> header has changed from previous
versions.  By default, the configuration in CentOS Enterprise Linux uses a UTF-8
locale, the default character set used in <code class="filename">httpd.conf</code> is now
<code class="literal">utf-8</code>, rather than the previous default of
<code class="literal">ISO-8859-1</code>.</p><p>To configure the server to use a default character set of
ISO-8859-1 if migrating non-UTF-8 content, change:

</p><div class="informalexample"><pre class="programlisting">
AddDefaultCharset utf-8
</pre></div><p> 

to

</p><div class="informalexample"><pre class="programlisting">
AddDefaultCharset <span class="bold"><strong>ISO-8859-1</strong></span>
</pre></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id2628757"></a>2.3. Virtual Hosts</h3></div></div></div><p>The contents of all <code class="literal">&lt;VirtualHost&gt;</code>
containers should be migrated in the same way as the main server
section as described in <a href="#mainserverconfig" title="2.2. Main server configuration">Section 2.2, &#8220;Main server configuration&#8221;</a>.  Note that
the SSL virtual host context has been moved into the file
<code class="filename">/etc/httpd/conf.d/ssl.conf</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/vhosts/" target="_top">Apache
Virtual Host Documentation</a></li></ul></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="modules"></a>2.4. Modules</h3></div></div></div><p>In Apache 2.0 the module system has been changed to allow
modules to be chained together to combine them in new and interesting
ways.  CGI scripts, for example, can generate server-parsed HTML
documents which can then be processed by <code class="literal">mod_include</code>.  The
possibilities are only limited by the bounds of your
imagination.</p><p>The way this actually works is that each request is served by
exactly one <span class="emphasis"><em>handler</em></span> module followed by zero or
more <span class="emphasis"><em>filter</em></span> modules.  Under Apache 1.3, for
example, a PHP script would be handled entirely by the PHP
module; under Apache 2.0 the request is initially
<span class="emphasis"><em>handled</em></span> by the core module (which serves static
files) and subsequently <span class="emphasis"><em>filtered</em></span> by the PHP
module.</p><p>Exactly how to use this (and all the other new features of
Apache 2.0 for that matter) is beyond the scope of this document,
however the change has ramifications if you have used PATH_INFO
(trailing path information after the true filename) in a document
which is handled by a module that is now implemented as a filter.  The
core module, which initially handles the request, does not by default
understand PATH_INFO and will serve 404 Not Found errors for requests
that have it.  The <code class="literal">AcceptPathInfo</code> directive can be
used to coerce the core module into accepting requests with PATH_INFO:

</p><div class="informalexample"><pre class="programlisting">
AcceptPathInfo on
</pre></div><p> 

</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo" target="_top"><code class="literal">AcceptPathInfo</code></a></li><li><a href="http://httpd.apache.org/docs-2.0/handler.html" target="_top">Apache's
Handler Use</a></li><li><a href="http://httpd.apache.org/docs-2.0/filter.html" target="_top">Filters</a></li></ul></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2628915"></a>2.4.1. mod_ssl</h4></div></div></div><p>The configuration for <code class="literal">mod_ssl</code> has been moved from <code class="filename">httpd.conf</code>
into the file <code class="filename">/etc/httpd/conf.d/ssl.conf</code>.  For
this file to be loaded, and hence for <code class="literal">mod_ssl</code> to work, you must have
the statement <code class="literal">Include conf.d/*.conf</code> in your
<code class="filename">httpd.conf</code> as described in <a href="#dsosupport" title="2.1.3. Dynamic Shared Object (DSO) Support">Section 2.1.3, &#8220;Dynamic Shared Object (DSO) Support&#8221;</a>.</p><p><code class="literal">ServerName</code> directives in SSL virtual hosts
must explicitly specify the port number:</p><div class="example"><a name="id2628977"></a><p class="title"><b>Example 3. Apache 1.3 SSL virtual host configuration</b></p><pre class="programlisting">
##
## SSL Virtual Host Context
##

&lt;VirtualHost _default_:443&gt;
    # General setup for the virtual host
    ServerName ssl.host.name
    ...
&lt;/VirtualHost&gt;
</pre></div><div class="example"><a name="id2628995"></a><p class="title"><b>Example 4. Equivalent Apache 2.0 SSL virtual host configuration</b></p><pre class="programlisting">
##
## SSL Virtual Host Context
##

&lt;VirtualHost _default_:443&gt;
    # General setup for the virtual host
    ServerName ssl.host.name<span class="bold"><strong>:443</strong></span>
    ...
&lt;/VirtualHost&gt;
</pre></div><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_ssl.html" target="_top">Apache
Module mod_ssl</a></li><li><a href="http://httpd.apache.org/docs-2.0/vhosts/" target="_top">Apache
Virtual Host Documentation</a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629044"></a>2.4.2. mod_proxy</h4></div></div></div><p>Proxy access control statements are now placed inside a
<code class="literal">&lt;Proxy&gt;</code> block rather than a
<code class="literal">&lt;Directory proxy:&gt;</code>.</p><p>The caching functionality of the old <code class="literal">mod_proxy</code> has been split
out into three other modules (<code class="literal">mod_cache</code>,
<code class="literal">mod_disk_cache</code>, <code class="literal">mod_file_cache</code>),
although these generally use the same or similar directives as the old
<code class="literal">mod_proxy</code>.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_proxy.html" target="_top">Apache
Module mod_proxy</a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629120"></a>2.4.3. mod_include</h4></div></div></div><p><code class="literal">mod_include</code> is now implemented as a <a href="#modules" title="2.4. Modules">filter</a> and must therefore be enabled
differently:</p><div class="example"><a name="id2629141"></a><p class="title"><b>Example 5. Apache 1.3 <code class="literal">mod_include</code> configuration</b></p><pre class="programlisting">
AddType text/html .shtml
AddHandler server-parsed .shtml
</pre></div><div class="example"><a name="id2629160"></a><p class="title"><b>Example 6. Equivalent Apache 2.0 <code class="literal">mod_include</code> configuration</b></p><pre class="programlisting">
AddOutputFilter INCLUDES .shtml
</pre></div><p>Note that <code class="literal">Options +Includes</code> is still
required.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_include.html" target="_top">Apache
Module mod_include</a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="mod_auth_dbm"></a>2.4.4. mod_auth_dbm and mod_auth_db</h4></div></div></div><p>Apache 1.3 supported two authentication modules, <code class="literal">mod_auth_db</code>
and <code class="literal">mod_auth_dbm</code>, which used Berkeley Databases and DBM databases
respectively.  These modules have been combined into a single module
named <code class="literal">mod_auth_dbm</code> in Apache 2.0, which can access several different
database formats.  To migrate from <code class="literal">mod_auth_db</code> in Apache 1.3,
configuration files should be adjusted by replacing
<code class="literal">AuthDBUserFile</code> and
<code class="literal">AuthDBGroupFile</code> with the <code class="literal">mod_auth_dbm</code> equivalents
<code class="literal">AuthDBMUserFile</code> and
<code class="literal">AuthDBMGroupFile</code>, and the directive
<code class="literal">AuthDBMType DB</code> should be added to indicate the type
of database file in use.</p><p><a href="#authex1" title="Example 7. Apache 1.3 mod_auth_db configuration">Example 7, &#8220;Apache 1.3 <code class="literal">mod_auth_db</code> configuration&#8221;</a> shows a sample <code class="literal">mod_auth_db</code>
configuration for Apache 1.3, and <a href="#authex2" title="Example 8. Equivalent Apache 2.0 mod_auth_dbm configuration">Example 8, &#8220;Equivalent Apache 2.0 <code class="literal">mod_auth_dbm</code> configuration&#8221;</a> shows how
it would be migrated to Apache 2.0.  Note that the
<code class="literal">AuthDBUserFile</code> directive can also be used in
<code class="filename">.htaccess</code> files.</p><div class="example"><a name="authex1"></a><p class="title"><b>Example 7. Apache 1.3 <code class="literal">mod_auth_db</code> configuration</b></p><pre class="programlisting">
&lt;Location /private/&gt;
  AuthType Basic
  AuthName "My Private Files"
  AuthDBUserFile /var/www/authdb
  require valid-user
&lt;/Location&gt;
</pre></div><div class="example"><a name="authex2"></a><p class="title"><b>Example 8. Equivalent Apache 2.0 <code class="literal">mod_auth_dbm</code> configuration</b></p><pre class="programlisting">
&lt;Location /private/&gt;
  AuthType Basic
  AuthName "My Private Files"
  <span class="bold"><strong>AuthDBMUserFile /var/www/authdb
  AuthDBMType DB</strong></span>
  require valid-user
&lt;/Location&gt;
</pre></div><p>The <span><strong class="command">dbmmanage</strong></span> Perl script, used to manipulate
username/password databases, has been replaced by the <span><strong class="command">htdbm</strong></span> program
in Apache 2.0.  <span><strong class="command">htdbm</strong></span> offers equivalent functionality, and like
<code class="literal">mod_auth_dbm</code> can operate a variety of database formats; a
<code class="literal">-T</code> argument can be used to specify the format to
use for a particular command.  <a href="#htdbm" title="Table 1. Migrating from dbmmanage to htdbm">Table 1, &#8220;Migrating from <span>dbmmanage</span> to <span>htdbm</span>&#8221;</a> shows how to
migrate from using <span><strong class="command">dbmmanage</strong></span> on a DBM-format database with Apache
1.3, to <span><strong class="command">htdbm</strong></span> in 2.0.</p><div class="table"><a name="htdbm"></a><p class="title"><b>Table 1. Migrating from <span>dbmmanage</span> to <span>htdbm</span></b></p><table summary="Migrating from dbmmanage to htdbm" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Action</th><th>dbmmanage command (Apache 1.3)</th><th>Equivalent htdbm command (Apache 2.0)</th></tr></thead><tbody><tr><td>Add user to database (using given password)</td><td><code class="literal">dbmmanage authdb add username password</code></td><td><code class="literal">htdbm -b -TDB authdb username password</code></td></tr><tr><td>Add user to database (prompts for password)</td><td><code class="literal">dbmmanage authdb adduser username</code></td><td><code class="literal">htdbm -TDB authdb username</code></td></tr><tr><td>Remove user from database</td><td><code class="literal">dbmmanage authdb delete username</code></td><td><code class="literal">htdbm -x -TDB authdb username</code></td></tr><tr><td>List users in database</td><td><code class="literal">dbmmanage authdb view</code></td><td><code class="literal">htdbm -l -TDB authdb</code></td></tr><tr><td>Verify a password</td><td><code class="literal">dbmmanage authdb check username</code></td><td><code class="literal">htdbm -v -TDB authdb username</code></td></tr></tbody></table></div><p>The <code class="literal">-m</code> and <code class="literal">-s</code> options work
with both <span><strong class="command">dbmmanage</strong></span> and <span><strong class="command">htdbm</strong></span> (enabling the use of the MD5 or SHA1
algorithms for hashing passwords, respectively).  When creating a new
database with <span><strong class="command">htdbm</strong></span>, the <code class="literal">-c</code> option must be
used.</p><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html" target="_top">Apache
Module mod_auth_dbm</a></li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629649"></a>2.4.5. PHP</h4></div></div></div><p>The configuration for PHP has been moved from <code class="filename">httpd.conf</code> into
the file <code class="filename">/etc/httpd/conf.d/php.conf</code>.  For this
file to be loaded, and hence for PHP to work, you must have the
statement <code class="literal">Include conf.d/*.conf</code> in your <code class="filename">httpd.conf</code>
as described in <a href="#dsosupport" title="2.1.3. Dynamic Shared Object (DSO) Support">Section 2.1.3, &#8220;Dynamic Shared Object (DSO) Support&#8221;</a>.</p><p>In PHP 4.2.0 and later the default set of predefined variables
which are available in the global scope has changed. Individual input
and server variables are by default no longer placed directly into the
global scope; rather, they are placed into a number superglobal
arrays.  This change may cause scripts to break, and you may revert to
the old behaviour globally by setting
<code class="literal">register_globals</code> to <code class="literal">On</code> in the
file <code class="filename">/etc/php.ini</code> or more selectivly by using
<code class="literal">php_value register_globals 1</code> in your <code class="filename">httpd.conf</code> or
in <code class="filename">.htaccess</code> files.</p><p>As of the <code class="literal">php-4.3.6-5</code> package, the default
<code class="filename">/etc/php.ini</code> has also changed: it is now based on
the <code class="filename">php.ini-recommended</code> defaults included in PHP
releases, rather than the <code class="filename">php.ini-dist</code> defaults
as used previously.  Notable differences are that:

</p><div class="itemizedlist"><ul type="disc"><li>display_errors is now <span class="emphasis"><em>Off</em></span></li><li>log_errors now <span class="emphasis"><em>On</em></span></li><li>magic_quotes_gpc is now <span class="emphasis"><em>Off</em></span></li></ul></div><p>See also:
</p><div class="itemizedlist"><ul type="disc"><li><a href="http://www.php.net/release_4_1_0.php" target="_top">PHP 4.1.0 Release
Announcement</a> for details of the global scope changes</li></ul></div></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629806"></a>2.4.6. mod_perl</h4></div></div></div><p>The configuration for <code class="literal">mod_perl</code> has been moved from <code class="filename">httpd.conf</code>
into the file <code class="filename">/etc/httpd/conf.d/perl.conf</code>.  For
this file to be loaded, and hence for <code class="literal">mod_perl</code> to work, you must
have the statement <code class="literal">Include conf.d/*.conf</code> in your
<code class="filename">httpd.conf</code> as described in <a href="#dsosupport" title="2.1.3. Dynamic Shared Object (DSO) Support">Section 2.1.3, &#8220;Dynamic Shared Object (DSO) Support&#8221;</a>.</p><p>Occurances of <code class="literal">Apache::</code> in your <code class="filename">httpd.conf</code>
must be replaced with <code class="literal">ModPerl::</code>.  Additionally, the
manner in which handlers are registered has been changed, for
example:</p><div class="example"><a name="id2629882"></a><p class="title"><b>Example 9. Apache 1.3 <code class="literal">mod_perl</code> configuration</b></p><pre class="programlisting">
&lt;Directory /var/www/perl&gt;
    SetHandler perl-script
    PerlHandler Apache::Registry
    Options +ExecCGI
&lt;/Directory&gt;
</pre></div><div class="example"><a name="id2629906"></a><p class="title"><b>Example 10. Equivalent Apache 2.0 <code class="literal">mod_perl</code> configuration</b></p><pre class="programlisting">
&lt;Directory /var/www/perl&gt;
    SetHandler perl-script
    <span class="bold"><strong>PerlResponseHandler ModPerl::Registry</strong></span>
    Options +ExecCGI
&lt;/Directory&gt;
</pre></div><p>Most modules for <code class="literal">mod_perl</code> 1.x should work without modification
with <code class="literal">mod_perl</code> 2.x.  XS modules will require recompilation and may
possibly require minor Makefile modifications.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2629959"></a>2.4.7. mod_python</h4></div></div></div><p>The configuration for <code class="literal">mod_python</code> has been moved from <code class="filename">httpd.conf</code>
into the file <code class="filename">/etc/httpd/conf.d/python.conf</code>.  For
this file to be loaded, and hence for <code class="literal">mod_python</code> to work, you must
have the statement <code class="literal">Include conf.d/*.conf</code> in your
<code class="filename">httpd.conf</code> as described in <a href="#dsosupport" title="2.1.3. Dynamic Shared Object (DSO) Support">Section 2.1.3, &#8220;Dynamic Shared Object (DSO) Support&#8221;</a>.</p></div><div class="sect3" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id2630011"></a>2.4.8. suexec</h4></div></div></div><p>In Apache 2.0, suexec is configured using the new
<code class="literal">SuexecUserGroup</code> directive rather than 
<code class="literal">User</code> and <code class="literal">Group</code>.</p><div class="example"><a name="id2630042"></a><p class="title"><b>Example 11. Apache 1.3 suexec configuration</b></p><pre class="programlisting">
&lt;VirtualHost vhost.example.com:80&gt;
    User someone
    Group somegroup
&lt;/VirtualHost&gt;
</pre></div><div class="example"><a name="id2630058"></a><p class="title"><b>Example 12. Equivalent Apache 2.0 suexec configuration</b></p><pre class="programlisting">
&lt;VirtualHost vhost.example.com:80&gt;
    SuexecUserGroup someone somegroup
&lt;/VirtualHost&gt;
</pre></div></div></div></div><div class="appendix" lang="en"><h2 class="title" style="clear: both"><a name="pkgchanges"></a>A. Packaging Changes</h2><div class="itemizedlist"><ul type="disc"><li>The <code class="literal">apache</code>,
<code class="literal">apache-devel</code> and <code class="literal">apache-manual</code>
packages have been renamed as <code class="literal">httpd</code>, <code class="literal">httpd-devel</code>
and <code class="literal">httpd-manual</code>.</li><li>The <code class="literal">mod_dav</code> package has been
incorporated into the <code class="literal">httpd</code> package.</li><li>The <code class="literal">mod_put</code> and
<code class="literal">mod_roaming</code> packages have been removed, since their
functionality is a subset of that provided by
<code class="literal">mod_dav</code>.</li><li>The <code class="literal">mod_auth_any</code> and
<code class="literal">mod_bandwidth</code> packages have been
removed.</li><li><code class="literal">mod_ssl</code>'s version is now synchronised with <code class="literal">httpd</code>,
which means that the <code class="literal">mod_ssl</code> package for Apache 2.0 has a lower
version than <code class="literal">mod_ssl</code> package for 1.3.</li></ul></div></div></div></body></html>