cvsdist f8e1fe3
 
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
  "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
cvsdist f8e1fe3
cvsdist f8e1fe3
httpd</literal>">
cvsdist f8e1fe3
httpd.conf</filename>">
cvsdist f8e1fe3
mod_ssl</literal>">
cvsdist f8e1fe3
mod_proxy</literal>">
cvsdist f8e1fe3
mod_include</literal>">
cvsdist f8e1fe3
mod_auth_db</literal>">
cvsdist f8e1fe3
mod_auth_dbm</literal>">
cvsdist f8e1fe3
mod_perl</literal>">
cvsdist f8e1fe3
mod_python</literal>">
cvsdist f8e1fe3
cvsdist f8e1fe3
htdbm</command>">
cvsdist f8e1fe3
dbmmanage</command>">
cvsdist f8e1fe3
cvsdist d48e904
cvsdist d48e904
cvsdist d48e904
prefork</emphasis>">
cvsdist d48e904
worker</emphasis>">
cvsdist d48e904
cvsdist f8e1fe3
]>
cvsdist f8e1fe3
cvsdist f8e1fe3
<article>
cvsdist f8e1fe3
cvsdist f8e1fe3
<artheader>
cvsdist f8e1fe3
<title>Apache Migration HOWTO</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<abstract>
cvsdist f8e1fe3
cvsdist d48e904
<para>This HOWTO covers the migration of &distro; web servers from
cvsdist d48e904
version 1.3 of the Apache HTTP server to version 2.0.  It explains the
cvsdist d48e904
relevant differences between the 1.3 and 2.0 packages, and describes
cvsdist d48e904
the process required to migrate the server configuration from 1.3 to
cvsdist d48e904
2.0.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
</abstract>
cvsdist f8e1fe3
</artheader>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect1>
cvsdist f8e1fe3
<title>Naming and filesystem changes</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2>
cvsdist f8e1fe3
<title>Packaging changes</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>When using RPM to administer your system you should be aware
cvsdist f8e1fe3
that some packages have been renamed, some have been incorporated into
cvsdist f8e1fe3
others, and some have been deprecated.  The major changes are that the
cvsdist f8e1fe3
<literal>apache</literal>, <literal>apache-devel</literal> and
cvsdist f8e1fe3
<literal>apache-manual</literal> packages have been renamed as
cvsdist f8e1fe3
&httpd;, <literal>httpd-devel</literal> and
cvsdist f8e1fe3
<literal>httpd-manual</literal>, and that the
cvsdist f8e1fe3
<literal>mod_dav</literal> package has been incorporated into the
cvsdist f8e1fe3
&httpd; package.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>A complete breakdown of the packaging changes can be found in
cvsdist f8e1fe3
<xref linkend="pkgchanges"/>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2>
cvsdist f8e1fe3
<title>Filesystem changes</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The single major change to the filesystem layout is that there
cvsdist f8e1fe3
is now a directory, <filename>/etc/httpd/conf.d</filename>, into which
cvsdist f8e1fe3
the configuration files for individually packaged modules (&mod_ssl;,
cvsdist f8e1fe3
<literal>php</literal>, &mod_perl; and so on) are placed.  The server
cvsdist f8e1fe3
is instructed to load configuration files from this location by the
cvsdist f8e1fe3
directive <literal>Include conf.d/*.conf</literal> within
cvsdist f8e1fe3
<filename>/etc/httpd/conf/httpd.conf</filename>, so it is vital that
cvsdist f8e1fe3
this line be inserted when migrating an existing configuration.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Of the many minor changes, the most important to be aware of are
cvsdist f8e1fe3
that the utility programs <command>ab</command> and
cvsdist f8e1fe3
<command>logresolve</command> have been moved from
cvsdist f8e1fe3
<filename>/usr/sbin</filename> to <filename>/usr/bin</filename>, which
cvsdist f8e1fe3
will cause scripts with absolute paths to these binaries to fail; the
cvsdist f8e1fe3
&dbmmanage; command has been replaced by &htdbm; (see 
cvsdist f8e1fe3
linkend="mod_auth_dbm"/>); the logrotate configuration file has been
cvsdist f8e1fe3
renamed from <filename>/etc/logrotate.d/apache</filename> to
cvsdist f8e1fe3
<filename>/etc/logrotate.d/httpd</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
</sect1>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect1>
cvsdist f8e1fe3
<title>Migrating your configuration</title>
cvsdist f8e1fe3
cvsdist d48e904
<para>If you have upgraded your server from a previous version of 
cvsdist d48e904
&distro; upon which Apache was installed then the stock configuration
cvsdist f8e1fe3
file from the Apache 2.0 package will have been created as
cvsdist f8e1fe3
<filename>/etc/httpd/conf/httpd.conf.rpmnew</filename>, leaving your
cvsdist f8e1fe3
original &httpdconf; untouched.  It is, of course, entirely up to you
cvsdist f8e1fe3
whether you use the new configuration file and migrate your old
cvsdist f8e1fe3
settings to it, or use your existing file as a base and modify it to
cvsdist f8e1fe3
suit, however some parts of the file have changed more than others and
cvsdist f8e1fe3
a mixed approach is generally the best.  The stock configuration files
cvsdist f8e1fe3
for both 1.3 and 2.0 are divided into three sections, and for each of
cvsdist f8e1fe3
these this document will suggest what is hopefully the easiest
cvsdist f8e1fe3
route.</para>
cvsdist f8e1fe3
cvsdist d48e904
<para>If your &httpdconf; has been modified from the default
cvsdist d48e904
and you have saved a copy of the original then you may find the
cvsdist f8e1fe3
<command>diff</command> command comes in handy.  Invoked as:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
diff -u httpd.conf.orig httpd.conf | less
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample>
cvsdist f8e1fe3
cvsdist f8e1fe3
for example, it will highlight the modifications you have made.  If
cvsdist f8e1fe3
you do not have a copy of the original file all is not lost, since it
cvsdist f8e1fe3
is possible to extract it from an RPM package using the
cvsdist f8e1fe3
<command>rpm2cpio</command> and <command>cpio</command> commands, for
cvsdist f8e1fe3
example:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
rpm2cpio apache-1.3.23-11.i386.rpm | cpio -i --make
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample>
cvsdist f8e1fe3
cvsdist f8e1fe3
Finally, it is useful to know that Apache has a testing mode to check
cvsdist f8e1fe3
your configuration for errors.  This may be invoked as:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
apachectl configtest
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample>
cvsdist f8e1fe3
</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2>
cvsdist f8e1fe3
<title>Global Environment</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The global environment section of the configuration file
cvsdist f8e1fe3
contains directives which affect the overall operation of Apache, such
cvsdist f8e1fe3
as the number of concurrent requests it can handle and the locations of
cvsdist f8e1fe3
the various files it uses.  This section requires a large number of
cvsdist f8e1fe3
changes compared with the others and it is therefore recommended that
cvsdist f8e1fe3
you base this section on the Apache 2.0 configuration file and migrate
cvsdist f8e1fe3
your old settings into it.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Selecting which interfaces and ports to bind to</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>BindAddress</literal> and <literal>Port</literal>
cvsdist f8e1fe3
directives no longer exist: their functionality is now provided by a
cvsdist f8e1fe3
more flexible <literal>Listen</literal> directive.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>If you had set <literal>Port 80</literal> you should change it
cvsdist f8e1fe3
to <literal>Listen 80</literal> instead.  If you had set
cvsdist f8e1fe3
<literal>Port</literal> to some other value then you should also
cvsdist f8e1fe3
append the port number to the contents of your
cvsdist f8e1fe3
<literal>ServerName</literal> directive:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Apache 1.3 port configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
Port 123
cvsdist f8e1fe3
ServerName www.example.com
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 port configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<emphasis role="bold">Listen</emphasis> 123
cvsdist f8e1fe3
ServerName www.example.com<emphasis role="bold">:123</emphasis>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mpm_common.html#listen"><literal>Listen</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/core.html#servername"><literal>ServerName</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Server-pool size regulation</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>In Apache 2.0, the responsibility for accepting requests and
cvsdist f8e1fe3
dispatching children to handle them has been abstracted into a group
cvsdist f8e1fe3
of modules called Multi-Processing Modules (MPMs); the original Apache
cvsdist d48e904
1.3 behaviour has now been moved into the &prefork; MPM.</para>
cvsdist f8e1fe3
cvsdist d48e904
<para>The MPM used by default on &distro; is &prefork; which
cvsdist f8e1fe3
accepts the same directives (<literal>StartServers</literal>,
cvsdist f8e1fe3
<literal>MinSpareServers</literal>,
cvsdist f8e1fe3
<literal>MaxSpareServers</literal>, <literal>MaxClients</literal> and
cvsdist f8e1fe3
<literal>MaxRequestsPerChild</literal>) as Apache 1.3 and as such the
cvsdist f8e1fe3
values of these directives may be migrated across directly.</para>
cvsdist f8e1fe3
cvsdist d48e904
<para>An alternative, thread-based MPM called &worker; is also available;
cvsdist d48e904
to use this MPM, add the line:
cvsdist d48e904
cvsdist d48e904
<informalexample>
cvsdist d48e904
<programlisting>
cvsdist d48e904
HTTPD=/usr/sbin/httpd.worker
cvsdist d48e904
</programlisting>
cvsdist d48e904
</informalexample>
cvsdist d48e904
cvsdist d48e904
to the file <filename>/etc/sysconfig/httpd</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mpm.html">Apache
cvsdist f8e1fe3
Multi-Processing Modules</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3 id="dsosupport">
cvsdist f8e1fe3
<title>Dynamic Shared Object (DSO) Support</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>There are many changes required here and it is highly
cvsdist f8e1fe3
recommended that anyone trying to modify an Apache 1.3 configuration
cvsdist f8e1fe3
to suit Apache 2.0 (as opposed to migrating your changes into the
cvsdist d48e904
Apache 2.0 configuration) simply copy this section from the stock 
cvsdist d48e904
&distro; Apache 2.0 configuration.  If you do decide to try and
cvsdist f8e1fe3
modify your original file, please note that it is of paramount
cvsdist f8e1fe3
importance that your &httpdconf; contains the following directive:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
#
cvsdist f8e1fe3
# Load config files from the config directory "/etc/httpd/conf.d".
cvsdist f8e1fe3
#
cvsdist f8e1fe3
Include conf.d/*.conf
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample>
cvsdist f8e1fe3
cvsdist f8e1fe3
Omission of this directive will result in the failure of all modules
cvsdist f8e1fe3
packaged in their own RPMs (&mod_ssl;, <literal>php</literal>,
cvsdist f8e1fe3
&mod_perl; and the like).</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Those who still don't want to simply copy the section from the
cvsdist f8e1fe3
stock Apache 2.0 configuration should note the following:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The <literal>AddModule</literal> and
cvsdist f8e1fe3
<literal>ClearModuleList</literal> directives no longer exist. These
cvsdist f8e1fe3
directives where used to ensure that modules could be enabled in the
cvsdist f8e1fe3
correct order. The new Apache 2.0 API allows modules to explicitly
cvsdist f8e1fe3
specify their ordering, eliminating the need for these
cvsdist f8e1fe3
directives.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The order of the <literal>LoadModule</literal> lines
cvsdist f8e1fe3
is thus no longer relevant.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>Many modules have been added, removed, renamed, split
cvsdist f8e1fe3
up, or incorporated with each other.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para><literal>LoadModule</literal> lines for modules
cvsdist f8e1fe3
packaged in their own RPMs (&mod_ssl;, <literal>php</literal>,
cvsdist f8e1fe3
&mod_perl; and the like) are no longer necessary as they can be found
cvsdist f8e1fe3
in the relevant file in the directory
cvsdist f8e1fe3
<filename>/etc/httpd/conf.d</filename>.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The various <literal>HAVE_XXX</literal> definitions
cvsdist f8e1fe3
are no longer defined.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Other changes</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>ServerType</literal> directive has been removed in
cvsdist f8e1fe3
Apache 2.0 which can only be run as <literal>ServerType
cvsdist f8e1fe3
standalone</literal>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>AccessConfig</literal> and
cvsdist f8e1fe3
<literal>ResourceConfig</literal> directives have been removed since
cvsdist f8e1fe3
they mirror the functionality of the <literal>Include</literal>
cvsdist f8e1fe3
directive.  If you have <literal>AccessConfig</literal> and
cvsdist f8e1fe3
<literal>ResourceConfig</literal> directives set then you need to
cvsdist f8e1fe3
replace these with <literal>Include</literal> directives.  To ensure
cvsdist f8e1fe3
that the files are read in the order implied by the older directives
cvsdist f8e1fe3
the <literal>Include</literal> directives should be placed at the end
cvsdist f8e1fe3
of &httpdconf;, with the one corresponding to
cvsdist d48e904
<literal>ResourceConfig</literal> preceding the one corresponding to
cvsdist f8e1fe3
<literal>AccessConfig</literal>.  If you were making use of the
cvsdist f8e1fe3
default values you will need to include them explicitly as
cvsdist f8e1fe3
<filename>conf/srm.conf</filename> and
cvsdist f8e1fe3
<filename>conf/access.conf</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2 id="mainserverconfig">
cvsdist f8e1fe3
<title>Main server configuration</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The main server configuration section of the configuration file
cvsdist f8e1fe3
sets up the main server, which responds to any requests that aren't
cvsdist f8e1fe3
handled by a <literal><VirtualHost></literal> definition.
cvsdist f8e1fe3
Values here also provide defaults for any
cvsdist f8e1fe3
<literal><VirtualHost></literal> containers you may
cvsdist f8e1fe3
define.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The directives used in this section have changed little between
cvsdist f8e1fe3
Apache 1.3 and Apache 2.0, so if your main server configuration is
cvsdist f8e1fe3
heavily customised you may find it easier to modify your existing
cvsdist f8e1fe3
configuration to suit Apache 2.0.  Users with only lightly customised
cvsdist f8e1fe3
main server sections are recommended to migrate their changes into the
cvsdist f8e1fe3
stock Apache 2.0 configuration.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>UserDir mapping</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>UserDir</literal> directive is used to enable URLs
cvsdist f8e1fe3
such as <filename>http://example.com/~jim/</filename> to map to a
cvsdist f8e1fe3
directory in the home directory of the user <literal>jim</literal>,
cvsdist f8e1fe3
such as <filename>/home/jim/public_html</filename>.  A side-effect of
cvsdist f8e1fe3
this feature allows a potential attacker to determine whether a given
cvsdist f8e1fe3
username is present on the system, so the default configuration for
cvsdist f8e1fe3
Apache 2.0 does not enable <literal>UserDir</literal>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>To enable <literal>UserDir</literal> mapping, change the
cvsdist f8e1fe3
directive: 
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
UserDir disable
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample> 
cvsdist f8e1fe3
to
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
UserDir public_html
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample> 
cvsdist f8e1fe3
in <filename>/etc/httpd/conf/httpd.conf</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_userdir.html#userdir"><literal>UserDir</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Logging</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>AgentLog</literal>, <literal>RefererLog</literal>
cvsdist f8e1fe3
and <literal>RefererIgnore</literal> directives have been removed.
cvsdist d48e904
Agent and referrer logs are still available using the
cvsdist f8e1fe3
<literal>CustomLog</literal> and <literal>LogFormat</literal>
cvsdist f8e1fe3
directives.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog"><literal>CustomLog</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#logformat"><literal>LogFormat</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Directory Indexing</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The deprecated <literal>FancyIndexing</literal> directive has
cvsdist f8e1fe3
now been removed. The same functionality is available through the
cvsdist f8e1fe3
<literal>FancyIndexing</literal> option to the
cvsdist f8e1fe3
<literal>IndexOptions</literal> directive.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The new <literal>VersionSort</literal> option to the
cvsdist f8e1fe3
<literal>IndexOptions</literal> directive causes files containing
cvsdist f8e1fe3
version numbers to be sorted in the natural way, so that
cvsdist f8e1fe3
<filename>apache-1.3.9.tar</filename> would appear before
cvsdist f8e1fe3
<filename>apache-1.3.12.tar</filename> in a directory index page.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The defaults for the <literal>ReadmeName</literal> and
cvsdist f8e1fe3
<literal>HeaderName</literal> directives have changed from
cvsdist f8e1fe3
<filename>README</filename> and <filename>HEADER</filename> to
cvsdist f8e1fe3
<filename>README.html</filename> and
cvsdist f8e1fe3
<filename>HEADER.html</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#indexoptions"><literal>IndexOptions</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#readmename"><literal>ReadmeName</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#headername"><literal>HeaderName</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Content Negotiation</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>CacheNegotiatedDocs</literal> directive now takes
cvsdist f8e1fe3
the argument: on or off. Existing instances of
cvsdist f8e1fe3
<literal>CacheNegotiatedDocs</literal> should be replaced with
cvsdist f8e1fe3
<literal>CacheNegotiatedDocs on</literal>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_negotiation.html#cachenegotiateddocs"><literal>CacheNegotiatedDocs</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>Error Documents</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>To use a hard-coded message with the
cvsdist f8e1fe3
<literal>ErrorDocument</literal> directive, the message should be
cvsdist f8e1fe3
enclosed in a pair of double quotes, rather than just preceded by a
cvsdist f8e1fe3
double quote as required in Apache 1.3.  For instance, change:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
ErrorDocument 404 "The document was not found
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample> 
cvsdist f8e1fe3
to
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
ErrorDocument 404 "The document was not found<emphasis role="bold">"</emphasis>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample>
cvsdist f8e1fe3
cvsdist f8e1fe3
</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/core.html#errordocument"><literal>ErrorDocument</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2>
cvsdist f8e1fe3
<title>Virtual Hosts</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The contents of all <literal><VirtualHost></literal>
cvsdist f8e1fe3
containers should be migrated in the same way as the main server
cvsdist f8e1fe3
section as described in <xref linkend="mainserverconfig"/>.  Note that
cvsdist f8e1fe3
the SSL virtual host context has been moved into the file
cvsdist f8e1fe3
<filename>/etc/httpd/conf.d/ssl.conf</filename>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><ulink url="http://httpd.apache.org/docs-2.0/vhosts/">Apache
cvsdist f8e1fe3
Virtual Host Documentation</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect2 id="modules">
cvsdist f8e1fe3
<title>Modules</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>In Apache 2.0 the module system has been changed to allow
cvsdist f8e1fe3
modules to be chained together to combine them in new and interesting
cvsdist f8e1fe3
ways.  CGI scripts, for example, can generate server-parsed HTML
cvsdist f8e1fe3
documents which can then be processed by &mod_include;.  The
cvsdist f8e1fe3
possibilities are only limited by the bounds of your
cvsdist f8e1fe3
imagination.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The way this actually works is that each request is served by
cvsdist f8e1fe3
exactly one <emphasis>handler</emphasis> module followed by zero or
cvsdist f8e1fe3
more <emphasis>filter</emphasis> modules.  Under Apache 1.3, for
cvsdist d48e904
example, a PHP script would be handled entirely by the PHP
cvsdist f8e1fe3
module; under Apache 2.0 the request is initially
cvsdist f8e1fe3
<emphasis>handled</emphasis> by the core module (which serves static
cvsdist f8e1fe3
files) and subsequently <emphasis>filtered</emphasis> by the PHP
cvsdist f8e1fe3
module.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Exactly how to use this (and all the other new features of
cvsdist f8e1fe3
Apache 2.0 for that matter) is beyond the scope of this document,
cvsdist f8e1fe3
however the change has ramifications if you have used PATH_INFO
cvsdist f8e1fe3
(trailing path information after the true filename) in a document
cvsdist f8e1fe3
which is handled by a module that is now implemented as a filter.  The
cvsdist f8e1fe3
core module, which initially handles the request, does not by default
cvsdist f8e1fe3
understand PATH_INFO and will serve 404 Not Found errors for requests
cvsdist f8e1fe3
that have it.  The <literal>AcceptPathInfo</literal> directive can be
cvsdist f8e1fe3
used to coerce the core module into accepting requests with PATH_INFO:
cvsdist f8e1fe3
cvsdist f8e1fe3
<informalexample>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
AcceptPathInfo on
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</informalexample> 
cvsdist f8e1fe3
cvsdist f8e1fe3
</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo"><literal>AcceptPathInfo</literal></ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/handler.html">Apache's
cvsdist f8e1fe3
Handler Use</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/filter.html">Filters</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>mod_ssl</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The configuration for &mod_ssl; has been moved from &httpdconf;
cvsdist f8e1fe3
into the file <filename>/etc/httpd/conf.d/ssl.conf</filename>.  For
cvsdist f8e1fe3
this file to be loaded, and hence for &mod_ssl; to work, you must have
cvsdist f8e1fe3
the statement <literal>Include conf.d/*.conf</literal> in your
cvsdist f8e1fe3
&httpdconf; as described in <xref linkend="dsosupport"/>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para><literal>ServerName</literal> directives in SSL virtual hosts
cvsdist f8e1fe3
must explicitly specify the port number:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Apache 1.3 SSL virtual host configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
##
cvsdist f8e1fe3
## SSL Virtual Host Context
cvsdist f8e1fe3
##
cvsdist f8e1fe3
cvsdist f8e1fe3
<VirtualHost _default_:443>
cvsdist f8e1fe3
    # General setup for the virtual host
cvsdist f8e1fe3
    ServerName ssl.host.name
cvsdist f8e1fe3
    ...
cvsdist f8e1fe3
</VirtualHost>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 SSL virtual host configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
##
cvsdist f8e1fe3
## SSL Virtual Host Context
cvsdist f8e1fe3
##
cvsdist f8e1fe3
cvsdist f8e1fe3
<VirtualHost _default_:443>
cvsdist f8e1fe3
    # General setup for the virtual host
cvsdist f8e1fe3
    ServerName ssl.host.name<emphasis role="bold">:443</emphasis>
cvsdist f8e1fe3
    ...
cvsdist f8e1fe3
</VirtualHost>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_ssl.html">Apache
cvsdist f8e1fe3
Module mod_ssl</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><ulink url="http://httpd.apache.org/docs-2.0/vhosts/">Apache
cvsdist f8e1fe3
Virtual Host Documentation</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>mod_proxy</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Proxy access control statements are now placed inside a
cvsdist f8e1fe3
<literal><Proxy></literal> block rather than a
cvsdist f8e1fe3
<literal><Directory proxy:></literal>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The caching functionality of the old &mod_proxy; has been split
cvsdist f8e1fe3
out into three other modules (<literal>mod_cache</literal>,
cvsdist f8e1fe3
<literal>mod_disk_cache</literal>, <literal>mod_file_cache</literal>),
cvsdist f8e1fe3
although these generally use the same or similar directives as the old
cvsdist f8e1fe3
&mod_proxy;.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_proxy.html">Apache
cvsdist f8e1fe3
Module mod_proxy</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>mod_include</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>&mod_include; is now implemented as a 
cvsdist f8e1fe3
linkend="modules">filter</link> and must therefore be enabled
cvsdist f8e1fe3
differently:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Apache 1.3 &mod_include; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
AddType text/html .shtml
cvsdist f8e1fe3
AddHandler server-parsed .shtml
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 &mod_include; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
AddOutputFilter INCLUDES .shtml
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Note that <literal>Options +Includes</literal> is still
cvsdist f8e1fe3
required.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_include.html">Apache
cvsdist f8e1fe3
Module mod_include</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3 id="mod_auth_dbm">
cvsdist f8e1fe3
<title>mod_auth_dbm and mod_auth_db</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Apache 1.3 supported two authentication modules, &mod_auth_db;
cvsdist f8e1fe3
and &mod_auth_dbm;, which used Berkeley Databases and DBM databases
cvsdist f8e1fe3
respectively.  These modules have been combined into a single module
cvsdist f8e1fe3
named &mod_auth_dbm; in Apache 2.0, which can access several different
cvsdist f8e1fe3
database formats.  To migrate from &mod_auth_db; in Apache 1.3,
cvsdist f8e1fe3
configuration files should be adjusted by replacing
cvsdist f8e1fe3
<literal>AuthDBUserFile</literal> and
cvsdist f8e1fe3
<literal>AuthDBGroupFile</literal> with the &mod_auth_dbm; equivalents
cvsdist f8e1fe3
<literal>AuthDBMUserFile</literal> and
cvsdist f8e1fe3
<literal>AuthDBMGroupFile</literal>, and the directive
cvsdist f8e1fe3
<literal>AuthDBMType DB</literal> should be added to indicate the type
cvsdist f8e1fe3
of database file in use.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para><xref linkend="authex1"/> shows a sample &mod_auth_db;
cvsdist f8e1fe3
configuration for Apache 1.3, and <xref linkend="authex2"/> shows how
cvsdist f8e1fe3
it would be migrated to Apache 2.0.  Note that the
cvsdist f8e1fe3
<literal>AuthDBUserFile</literal> directive can also be used in
cvsdist f8e1fe3
<filename>.htaccess</filename> files.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example id="authex1">
cvsdist f8e1fe3
<title>Apache 1.3 &mod_auth_db; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<Location /private/>
cvsdist f8e1fe3
  AuthType Basic
cvsdist f8e1fe3
  AuthName "My Private Files"
cvsdist f8e1fe3
  AuthDBUserFile /var/www/authdb
cvsdist f8e1fe3
  require valid-user
cvsdist f8e1fe3
</Location>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example id="authex2">
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 &mod_auth_dbm; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<Location /private/>
cvsdist f8e1fe3
  AuthType Basic
cvsdist f8e1fe3
  AuthName "My Private Files"
cvsdist f8e1fe3
  <emphasis role="bold">AuthDBMUserFile /var/www/authdb
cvsdist f8e1fe3
  AuthDBMType DB</emphasis>
cvsdist f8e1fe3
  require valid-user
cvsdist f8e1fe3
</Location>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The &dbmmanage; Perl script, used to manipulate
cvsdist f8e1fe3
username/password databases, has been replaced by the &htdbm; program
cvsdist f8e1fe3
in Apache 2.0.  &htdbm; offers equivalent functionality, and like
cvsdist f8e1fe3
&mod_auth_dbm; can operate a variety of database formats; a
cvsdist f8e1fe3
<literal>-T</literal> argument can be used to specify the format to
cvsdist f8e1fe3
use for a particular command.  <xref linkend="htdbm"/> shows how to
cvsdist f8e1fe3
migrate from using &dbmmanage; on a DBM-format database with Apache
cvsdist f8e1fe3
1.3, to &htdbm; in 2.0.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
<title>Migrating from &dbmmanage; to &htdbm;</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<tgroup cols="3" frame="none">
cvsdist f8e1fe3
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>Action</entry>
cvsdist f8e1fe3
<entry>dbmmanage command (Apache 1.3)</entry>
cvsdist f8e1fe3
<entry>Equivalent htdbm command (Apache 2.0)</entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
     and the table looks a bit ugly -->
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>Add user to database (using given password)</entry>
cvsdist f8e1fe3
<entry><literal>dbmmanage authdb add username password</literal></entry>
cvsdist f8e1fe3
<entry><literal>htdbm -b -TDB authdb username password</literal></entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>Add user to database (prompts for password)</entry>
cvsdist f8e1fe3
<entry><literal>dbmmanage authdb adduser username</literal></entry>
cvsdist f8e1fe3
<entry><literal>htdbm -TDB authdb username</literal></entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>Remove user from database</entry>
cvsdist f8e1fe3
<entry><literal>dbmmanage authdb delete username</literal></entry>
cvsdist f8e1fe3
<entry><literal>htdbm -x -TDB authdb username</literal></entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>List users in database</entry>
cvsdist f8e1fe3
<entry><literal>dbmmanage authdb view</literal></entry>
cvsdist f8e1fe3
<entry><literal>htdbm -l -TDB authdb</literal></entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
<row>
cvsdist f8e1fe3
<entry>Verify a password</entry>
cvsdist f8e1fe3
<entry><literal>dbmmanage authdb check username</literal></entry>
cvsdist f8e1fe3
<entry><literal>htdbm -v -TDB authdb username</literal></entry>
cvsdist f8e1fe3
</row>
cvsdist f8e1fe3
cvsdist f8e1fe3
</tgroup>
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The <literal>-m</literal> and <literal>-s</literal> options work
cvsdist f8e1fe3
with both &dbmmanage; and &htdbm; (enabling the use of the MD5 or SHA1
cvsdist f8e1fe3
algorithms for hashing passwords, respectively).  When creating a new
cvsdist f8e1fe3
database with &htdbm;, the <literal>-c</literal> option must be
cvsdist f8e1fe3
used.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
   * migrating from DBM to DBM
cvsdist f8e1fe3
-->
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://httpd.apache.org/docs-2.0/mod/mod_auth_dbm.html">Apache
cvsdist f8e1fe3
Module mod_auth_dbm</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>PHP</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The configuration for PHP has been moved from &httpdconf; into
cvsdist f8e1fe3
the file <filename>/etc/httpd/conf.d/php.conf</filename>.  For this
cvsdist f8e1fe3
file to be loaded, and hence for PHP to work, you must have the
cvsdist f8e1fe3
statement <literal>Include conf.d/*.conf</literal> in your &httpdconf;
cvsdist f8e1fe3
as described in <xref linkend="dsosupport"/>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>PHP is now implemented as a 
cvsdist f8e1fe3
linkend="modules">filter</link> and must therefore be enabled
cvsdist f8e1fe3
differently:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Apache 1.3 PHP configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
AddType application/x-httpd-php .php
cvsdist f8e1fe3
AddType application/x-httpd-php-source .phps
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 PHP configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<Files *.php>
cvsdist f8e1fe3
    SetOutputFilter PHP
cvsdist f8e1fe3
    SetInputFilter PHP
cvsdist f8e1fe3
</Files>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>In PHP 4.2.0 and later the default set of predefined variables
cvsdist f8e1fe3
which are available in the global scope has changed. Individual input
cvsdist f8e1fe3
and server variables are by default no longer placed directly into the
cvsdist f8e1fe3
global scope; rather, they are placed into a number superglobal
cvsdist f8e1fe3
arrays.  This change may cause scripts to break, and you may revert to
cvsdist f8e1fe3
the old behaviour globally by setting
cvsdist f8e1fe3
<literal>register_globals</literal> to <literal>On</literal> in the
cvsdist f8e1fe3
file <filename>/etc/php.ini</filename> or more selectivly by using
cvsdist f8e1fe3
<literal>php_value register_globals 1</literal> in your &httpdconf; or
cvsdist f8e1fe3
in <filename>.htaccess</filename> files.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Another change is that short open tags are now disabled to make
cvsdist f8e1fe3
it easier to develop PHP applications that serve XML or XHTML, so
cvsdist f8e1fe3
scripts must use <literal><?php</literal> or <literal><script
cvsdist f8e1fe3
language="php"></literal> rather than <literal><?</literal> to
cvsdist f8e1fe3
denote PHP code.  This change may cause scripts to break, and you may
cvsdist f8e1fe3
revert to the old behaviour globally by setting
cvsdist f8e1fe3
<literal>short_open_tag</literal> to <literal>On</literal> in the file
cvsdist f8e1fe3
<filename>/etc/php.ini</filename>.  Due to a bug in PHP it is not
cvsdist f8e1fe3
possible to set this more selectivly with <literal>php_value</literal>
cvsdist f8e1fe3
directives.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="http://www.php.net/release_4_1_0.php">PHP 4.1.0 Release
cvsdist f8e1fe3
Announcement</ulink> for details of the global scope changes</listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>mod_perl</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The configuration for &mod_perl; has been moved from &httpdconf;
cvsdist f8e1fe3
into the file <filename>/etc/httpd/conf.d/perl.conf</filename>.  For
cvsdist f8e1fe3
this file to be loaded, and hence for &mod_perl; to work, you must
cvsdist f8e1fe3
have the statement <literal>Include conf.d/*.conf</literal> in your
cvsdist f8e1fe3
&httpdconf; as described in <xref linkend="dsosupport"/>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Occurances of <literal>Apache::</literal> in your &httpdconf;
cvsdist f8e1fe3
must be replaced with <literal>ModPerl::</literal>.  Additionally, the
cvsdist f8e1fe3
manner in which handlers are registered has been changed, for
cvsdist f8e1fe3
example:</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Apache 1.3 &mod_perl; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<Directory /var/www/perl>
cvsdist f8e1fe3
    SetHandler perl-script
cvsdist f8e1fe3
    PerlHandler Apache::Registry
cvsdist f8e1fe3
    Options +ExecCGI
cvsdist f8e1fe3
</Directory>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<example>
cvsdist f8e1fe3
<title>Equivalent Apache 2.0 &mod_perl; configuration</title>
cvsdist f8e1fe3
<programlisting>
cvsdist f8e1fe3
<Directory /var/www/perl>
cvsdist f8e1fe3
    SetHandler perl-script
cvsdist d48e904
    <emphasis role="bold">PerlResponseHandler ModPerl::Registry</emphasis>
cvsdist f8e1fe3
    Options +ExecCGI
cvsdist f8e1fe3
</Directory>
cvsdist f8e1fe3
</programlisting>
cvsdist f8e1fe3
</example>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>Most modules for &mod_perl; 1.x should work without modification
cvsdist f8e1fe3
with &mod_perl; 2.x.  XS modules will require recompilation and may
cvsdist f8e1fe3
possibly require minor Makefile modifications.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>See also:
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem>
cvsdist f8e1fe3
url="XXX_not_on_the_web">mod_perl: porting from 1.x</ulink></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist></para>
cvsdist f8e1fe3
-->
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect3>
cvsdist f8e1fe3
cvsdist f8e1fe3
<sect3>
cvsdist f8e1fe3
<title>mod_python</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<para>The configuration for &mod_python; has been moved from &httpdconf;
cvsdist f8e1fe3
into the file <filename>/etc/httpd/conf.d/python.conf</filename>.  For
cvsdist f8e1fe3
this file to be loaded, and hence for &mod_python; to work, you must
cvsdist f8e1fe3
have the statement <literal>Include conf.d/*.conf</literal> in your
cvsdist f8e1fe3
&httpdconf; as described in <xref linkend="dsosupport"/>.</para>
cvsdist f8e1fe3
cvsdist f8e1fe3
</sect3>
cvsdist d48e904
cvsdist d48e904
<sect3>
cvsdist d48e904
<title>suexec</title>
cvsdist d48e904
cvsdist d48e904
<para>In Apache 2.0, suexec is configured using the new
cvsdist d48e904
<literal>SuexecUserGroup</literal> directive rather than 
cvsdist d48e904
<literal>User</literal> and <literal>Group</literal>.</para>
cvsdist d48e904
cvsdist d48e904
<example>
cvsdist d48e904
<title>Apache 1.3 suexec configuration</title>
cvsdist d48e904
<programlisting>
cvsdist d48e904
<VirtualHost vhost.example.com:80>
cvsdist d48e904
    User someone
cvsdist d48e904
    Group somegroup
cvsdist d48e904
</VirtualHost>
cvsdist d48e904
</programlisting>
cvsdist d48e904
</example>
cvsdist d48e904
cvsdist d48e904
<example>
cvsdist d48e904
<title>Equivalent Apache 2.0 suexec configuration</title>
cvsdist d48e904
<programlisting>
cvsdist d48e904
<VirtualHost vhost.example.com:80>
cvsdist d48e904
    SuexecUserGroup someone somegroup
cvsdist d48e904
</VirtualHost>
cvsdist d48e904
</programlisting>
cvsdist d48e904
</example>
cvsdist d48e904
</sect3>
cvsdist f8e1fe3
</sect2>
cvsdist f8e1fe3
</sect1>
cvsdist f8e1fe3
cvsdist f8e1fe3
<appendix id="pkgchanges">
cvsdist f8e1fe3
<title>Packaging Changes</title>
cvsdist f8e1fe3
cvsdist f8e1fe3
<itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The <literal>apache</literal>,
cvsdist f8e1fe3
<literal>apache-devel</literal> and <literal>apache-manual</literal>
cvsdist f8e1fe3
packages have been renamed as &httpd;, <literal>httpd-devel</literal>
cvsdist f8e1fe3
and <literal>httpd-manual</literal>.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The <literal>mod_dav</literal> package has been
cvsdist f8e1fe3
incorporated into the &httpd; package.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The <literal>mod_put</literal> and
cvsdist f8e1fe3
<literal>mod_roaming</literal> packages have been removed, since their
cvsdist f8e1fe3
functionality is a subset of that provided by
cvsdist f8e1fe3
<literal>mod_dav</literal>.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>The <literal>mod_auth_any</literal> and
cvsdist f8e1fe3
<literal>mod_bandwidth</literal> packages have been
cvsdist f8e1fe3
removed.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
<listitem><para>&mod_ssl;'s version is now synchronised with &httpd;,
cvsdist f8e1fe3
which means that the &mod_ssl; package for Apache 2.0 has a lower
cvsdist f8e1fe3
version than &mod_ssl; package for 1.3.</para></listitem>
cvsdist f8e1fe3
cvsdist f8e1fe3
</itemizedlist>
cvsdist f8e1fe3
cvsdist f8e1fe3
</appendix>
cvsdist f8e1fe3
cvsdist f8e1fe3
</article>