INSTALL revision 105475009f541187ba7a14a367547d9404c578be
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb APACHE INSTALLATION
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Introduction
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ============
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Apache 2.0's configuration and installation environment has changed
750f77ade4110c6b2315d6b9e9c22f643914d87drbb completely from Apache 1.3. Apache 1.3 used a custom set of scripts
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein to achieve easy installation. Apache 2.0 now uses libtool and
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein autoconf to create an environment that looks like many other Open
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Source projects.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein Installing the Apache 2.0 HTTP server
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein =====================================
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 1. Overview for the impatient
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --------------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ ./configure --prefix=PREFIX
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ make
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ make install
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ PREFIX/bin/apachectl start
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb NOTE: PREFIX is not the string "PREFIX". Instead use the Unix
750f77ade4110c6b2315d6b9e9c22f643914d87drbb filesystem path under which Apache should be installed. For
750f77ade4110c6b2315d6b9e9c22f643914d87drbb instance use "/usr/local/apache" for PREFIX above.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein NOTE: if you are building from a copy of the Apache CVS
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein repository, rather than a release distribution, then you
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein must use the "buildconf" script before running configure.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb NOTE: If you are building on FreeBSD, you should add the argument
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb --with-mpm=prefork to the configure line. The Apache Group
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb has discovered that threads do not work well with Apache
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb on FreeBSD. For that reason, we disable threads by default
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb on FreeBSD, and you need to build the prefork MPM. If you wish
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb to try to make threads work on FreeBSD, they can be re-enabled
e5ae5d1fdb84c905b0d658c6612310c601846b58rbb by using --enable-threads
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 2. Requirements
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb The following requirements exist for building Apache:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o Disk Space:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Make sure you have approximately 12 MB of temporary free disk
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein space available. After installation Apache occupies
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein approximately 5 MB of disk space (the actual required disk
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein space depends on the amount of compiled in third party
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein modules, etc).
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o ANSI-C Compiler:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Make sure you have an ANSI-C compiler installed. The GNU C
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein compiler (GCC) from the Free Software Foundation (FSF) is
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein recommended (version 2.7.2 is fine). If you don't have GCC
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein then at least make sure your vendors compiler is ANSI
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein compliant. You can find the homepage of GNU at
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein http://www.gnu.org/ and the GCC distribution under
750f77ade4110c6b2315d6b9e9c22f643914d87drbb http://www.gnu.org/order/ftp.html .
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o Perl 5 Interpreter [OPTIONAL]:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein For some of the support scripts like `apxs' or `dbmmanage'
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein (which are written in Perl) the Perl 5 interpreter is required
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein (versions 5.003 and 5.004 are fine). If no such interpreter is
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb found by the `configure' script this is no harm. Of
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb course, you still can build and install Apache 2.0. Only those
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein support scripts cannot be used. If you have multiple Perl
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein interpreters installed (perhaps a Perl 4 from the vendor and a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Perl 5 from your own), then it is recommended to use the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --with-perl option (see below) to make sure the correct one is
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb selected by ./configure.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o Dynamic Shared Object (DSO) support [OPTIONAL]:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein To provide maximum flexibility Apache now is able to load
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein modules under runtime via the DSO mechanism by using the
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb pragmatic apr_dso_open()/apr_dso_sym() calls. These calls
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein are not available under all operating systems therefore you
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb cannot use the DSO mechanism on all platforms. Apache relies
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb on autoconf to detect the ability to use DSOs, and libtool to
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb determine how to build DSOs. If your platform is supported by
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb libtool, and we can find DSO system calls, then DSOs should
c9c9280aa381ad6f63dbb0c9e2a17c016986482frbb work out-of-the-box.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb If your system is not on these lists but has the dlopen-style
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein interface, you either have to provide the appropriate compiler
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein and linker flags (see CFLAGS_SHLIB, LDFLAGS_SHLIB and
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein LDFLAGS_SHLIB_EXPORT below) manually or at least make sure a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Perl 5 interpreter is installed from which Apache can guess
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein the options.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein If you are building from a copy of the CVS repository, rather
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein than a release distribution, then you will need these additional
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein tools:
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein o Libtool 1.3.3:
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Make sure that you have libtool 1.3.3 or later installed
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein before trying to configure and build Apache 2.0. Libtool can
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein be downloaded from the Free Software Foundation (FSF), at
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein http://www.gnu.org/order/ftp.html.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein o Autoconf 2.13:
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Make sure that you have autoconf 2.13 or later installed
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein before trying to configure and build Apache 2.0. Autoconf can
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein be downloaded from the Free Software Foundation (FSF), at
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein http://www.gnu.org/order/ftp.html.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 3. Configuring the source tree
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ---------------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Setup:
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein If you have downloading the Apache 2.0 from the CVS, rather than
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein a release distribution, then you will need to prepare the source
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein tree for configuration and compilation. This is done by running:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ./buildconf
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein This script ensures that all required programs are installed on
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein the currently machine, and creates the ./configure script. If
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein you are using a package downloaded from apache.org then this step
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein is not necessary.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Introduction:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein The next step is to configure the Apache source tree for your
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein particular platform and personal requirements. The most important
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein setup here is the location prefix where Apache is to be installed
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein later, because Apache has to be configured for this location to
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein work correctly. But there are a lot of other options available
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein for your pleasure.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein For a short impression of what possibilities you have, here is a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein typical example which compiles Apache for the installation tree
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein /sw/pkg/apache with a particular compiler and flags plus the two
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein additional modules mod_rewrite and mod_speling for later loading
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein through the DSO mechanism:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
105475009f541187ba7a14a367547d9404c578befielding $ CC="pgcc" CFLAGS="-O2" \
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ./configure --prefix=/sw/pkg/apache \
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --enable-rewrite=shared \
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --enable-speling=shared
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein The easiest way to find all of the configuration flags for Apache
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein 2.0 is to run ./configure --help. What follows is a brief
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein description of most of the arguments.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Reference:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
105475009f541187ba7a14a367547d9404c578befielding $ [CC=...] [TARGET=...]
105475009f541187ba7a14a367547d9404c578befielding [CPPFLAGS=...] [NOTEST_CPPFLAGS=...]
105475009f541187ba7a14a367547d9404c578befielding [CFLAGS=...] [NOTEST_CFLAGS=...]
105475009f541187ba7a14a367547d9404c578befielding [CXXFLAGS=...] [NOTEST_CXXFLAGS=...]
105475009f541187ba7a14a367547d9404c578befielding [LDFLAGS=...] [NOTEST_LDFLAGS=...]
105475009f541187ba7a14a367547d9404c578befielding [LIBS=...] [NOTEST_LIBS=...]
105475009f541187ba7a14a367547d9404c578befielding [INCLUDES=...] [SHLIB_PATH=...]
105475009f541187ba7a14a367547d9404c578befielding
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ./configure
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--quiet] [--prefix=DIR] [--enable-NAME=(shared)]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--verbose] [--exec-prefix=PREFIX] [--disable-NAME]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--shadow[=DIR]] [--bindir=EPREFIX] [--with-mpm=NAME]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--show-layout] [--sbindir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--help] [--libexecdir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--mandir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--sysconfdir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--datadir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--includedir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--localstatedir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--runtimedir=DIR] [--enable-suexec]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--logfiledir=DIR] [--suexec-caller=UID]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--proxycachedir=DIR] [--suexec-docroot=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--with-layout=[FILE:]ID] [--suexec-logfile=FILE]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--suexec-userdir=DIR]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--with-perl=FILE] [--suexec-uidmin=UID]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--without-support] [--suexec-gidmin=GID]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--without-confadjust] [--suexec-safepath=PATH]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--without-execstrip]
105475009f541187ba7a14a367547d9404c578befielding [--server-uid=UID]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb [--server-gid=GID]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
105475009f541187ba7a14a367547d9404c578befielding [--enable-maintainter-mode]
105475009f541187ba7a14a367547d9404c578befielding [--enable-debug]
105475009f541187ba7a14a367547d9404c578befielding
105475009f541187ba7a14a367547d9404c578befielding Use the CC, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS, LIBS, INCLUDES,
105475009f541187ba7a14a367547d9404c578befielding SHLIB_PATH and TARGET environment variables to override or expand the
105475009f541187ba7a14a367547d9404c578befielding corresponding default entries as determined by configure.
105475009f541187ba7a14a367547d9404c578befielding
105475009f541187ba7a14a367547d9404c578befielding Use NOTEST_CPPFLAGS, NOTEST_CFLAGS, NOTEST_CXXFLAGS, NOTEST_LDFLAGS,
105475009f541187ba7a14a367547d9404c578befielding and NOTEST_LIBS to add entries that should only be used during
ad3eb329fd6c482b31ef8b10490c6f56075da367jim the actual build and compilation of Apache, such as -Werror.
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --prefix=PREFIX and --exec-prefix=EPREFIX options to
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein configure Apache to use a particular installation prefix. The
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein default is PREFIX=/usr/local/apache and EPREFIX=PREFIX.
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --bindir=DIR, --sbindir=DIR, --libexecdir=DIR,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --mandir=DIR, --sysconfdir=DIR, --datadir=DIR, --iconsdir=DIR,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --htdocsdir=DIR, --cgidir=DIR, --includedir=DIR,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --localstatedir=DIR, --runtimedir=DIR, --logfiledir=DIR and
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --proxycachedir=DIR option to change the paths for particular
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein subdirectories of the installation tree. Defaults are
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein bindir=EPREFIX/bin, sbindir=EPREFIX/bin,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein libexecdir=EPREFIX/modules, mandir=PREFIX/man,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein sysconfdir=PREFIX/conf, datadir=PREFIX, iconsdir=PREFIX/icons,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein htdocsdir=PREFIX/htdocs, cgidir=PREFIX/cgi-bin,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein includedir=PREFIX/include, localstatedir=PREFIX,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein runtimedir=PREFIX/logs, logfiledir=PREFIX/logs and
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein proxycachedir=PREFIX/proxy.
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Note: To reduce the pollution of shared installation
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein locations (like /usr/local/ or /etc) with Apache files
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein to a minimum the string ``/apache'' is automatically
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein appended to 'libexecdir', 'sysconfdir', 'datadir',
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein 'localstatedir' and 'includedir' if (and only if) the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein following points apply for each path individually:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 1. the path doesn't already contain the word ``apache''
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 2. the path was not directly customized by the user
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Keep in mind that per default these paths are derived
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein from 'prefix' and 'exec-prefix', so usually its only a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein matter whether these paths contain ``apache'' or
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein not. Although the defaults were defined with experience
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein in mind you always should make sure the paths fit your
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein situation by checking the finally chosen paths via the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --layout option.
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --with-layout=[F:]ID option to select a particular
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein installation path base-layout. You always _HAVE_ to select a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein base-layout. There are currently two layouts pre-defined in the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein file config.layout: `Apache' for the classical Apache path layout
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein and `GNU' for a path layout conforming to the GNU `standards'
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein document. When you want to use your own custom layout FOO, either
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein add a corresponding "<Layout FOO>...</Layout>" section to
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein config.layout and use --with-layout=FOO or place it into your own
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein file, say config.mypaths, and use
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein --with-layout=config.mypaths:FOO.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --show-layout option to check the final installation path
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein layout while fiddling with the options above.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --enable-NAME=(shared) and --disable-NAME options to
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein enable or disable a particular already distributed module from
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein the Apache package.
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --with-mpm=NAME option to determine which MPM should be
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein built for your server.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb _________________________________________________________________________
750f77ade4110c6b2315d6b9e9c22f643914d87drbb LIST OF AVAILABLE MODULES
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Environment creation
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_env .......... Set environment variables for CGI/SSI scripts
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_setenvif ..... Set environment variables based on HTTP headers
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_unique_id .... Generate unique identifiers for request
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Content type decisions
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_mime ......... Content type/encoding determination (configured)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_mime_magic ... Content type/encoding determination (automatic)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_negotiation .. Content selection based on the HTTP Accept* headers
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb URL mapping
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_alias ........ Simple URL translation and redirection
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_rewrite ...... Advanced URL translation and redirection
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_userdir ...... Selection of resource directories by username
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_speling ...... Correction of misspelled URLs
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Directory Handling
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_dir .......... Directory and directory default file handling
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_autoindex .... Automated directory index file generation
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein Access Control and Authentication
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_access ....... Access Control (user, host, network)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_auth ......... HTTP Basic Authentication (user, passwd)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_auth_dbm ..... HTTP Basic Authentication via Unix NDBM files
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_auth_db ...... HTTP Basic Authentication via Berkeley-DB files
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_auth_anon .... HTTP Basic Authentication for Anonymous-style users
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_digest ....... HTTP Digest Authentication
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb HTTP response
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_headers ...... Arbitrary HTTP response headers (configured)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_cern_meta .... Arbitrary HTTP response headers (CERN-style files)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_expires ...... Expires HTTP responses
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_asis ......... Raw HTTP responses
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Scripting
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_include ...... Server Side Includes (SSI) support
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_cgi .......... Common Gateway Interface (CGI) support
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_cgid ......... Common Gateway Interface (CGI) support for
750f77ade4110c6b2315d6b9e9c22f643914d87drbb multi-threaded MPMs
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_actions ...... Map CGI scripts to act as internal `handlers'
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Internal Content Handlers
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_status ....... Content handler for server run-time status
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_info ......... Content handler for server configuration summary
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Request Logging
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_log_config ... Customizable logging of requests
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_usertrack .... Logging of user click-trails via HTTP Cookies
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein Content Management
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein (-) mod_dav .......... WebDAV (RFC 2518) support for Apache
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein (-) mod_dav_fs ....... mod_dav backend to managing filesystem content
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Miscellaneous
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) mod_imap ......... Server-side Image Map support
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_proxy ........ Caching Proxy Module (HTTP, HTTPS, FTP)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_so ........... Dynamic Shared Object (DSO) bootstrapping
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Experimental
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_mmap_static .. Caching of frequently served pages via mmap()
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Development
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) mod_example ...... Apache API demonstration (developers only)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb MPMs
beaace1271473aa4854f529f2dac9738cd106578rbb mpmt_pthread ..... Multi-process(dynamic) Multi-threaded(static)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Unix MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb prefork .......... Preforking Unix MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb perchild ......... Multi-process(static) Multi-threaded(dynamic)
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Unix MPM, that allows a User per child process
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb winnt ............ Multi-process(1) Multi-threaded Windows MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb mpmt_beos ........ Multi-process Multi-threaded Beos MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb beos ............. Multi-process Multi-threaded Beos MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb spmt_os2 ......... Single-process Multi-threaded OS/2 MPM
750f77ade4110c6b2315d6b9e9c22f643914d87drbb _________________________________________________________________________
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (+) = enabled per default [disable with --disable-module]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb (-) = disabled per default [enable with --enable-module ]
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --enable-suexec option to enable the suEXEC feature by
60ed053fe71b1e3cfab8c4ed37afde30a6db4841rbb building and installing the "suexec" support program.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein CAUTION: FOR DETAILS ABOUT THE SUEXEC FEATURE WE HIGHLY RECOMMEND
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein YOU TO FIRST READ THE DOCUMENT htdocs/manual/suexec.html
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein BEFORE USING THE ABOVE OPTIONS.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein USING THE SUEXEC FEATURE PROPERLY CAN REDUCE
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein CONSIDERABLY THE SECURITY RISKS INVOLVED WITH ALLOWING
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein USERS TO DEVELOP AND RUN PRIVATE CGI OR SSI
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein PROGRAMS. HOWEVER, IF SUEXEC IS IMPROPERLY CONFIGURED,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein IT CAN CAUSE ANY NUMBER OF PROBLEMS AND POSSIBLY CREATE
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein NEW HOLES IN YOUR COMPUTER'S SECURITY. IF YOU AREN'T
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein FAMILIAR WITH MANAGING SETUID ROOT PROGRAMS AND THE
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein SECURITY ISSUES THEY PRESENT, WE HIGHLY RECOMMEND THAT
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein YOU NOT CONSIDER USING SUEXEC AND KEEP AWAY FROM THESE
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein OPTIONS!
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Use the --quiet option to disable all configuration verbose
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein messages.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 4. Building the package
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Now you can build the various parts which form the Apache package
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein by simply running the command:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ make
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Please be patient here, this takes approximately 2 minutes to
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein complete under a Pentium-166/FreeBSD-2.2 system, dependend on the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein amount of modules you have enabled.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 5. Installing the package
750f77ade4110c6b2315d6b9e9c22f643914d87drbb ----------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Now its time to install the package under the configured
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein installation PREFIX (see --prefix option above) by running:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ make install
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein For the paranoid hackers under us: The above command really
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein installs under prefix _only_, i.e. no other stuff from your
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein system is touched. Even if you upgrade an existing installation
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein your configuration files in PREFIX/conf/ are preserved.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 6. Testing the package
750f77ade4110c6b2315d6b9e9c22f643914d87drbb -------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Now you can fire up your Apache HTTP server by immediately
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein running:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ PREFIX/bin/apachectl start
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein and then you should be able to request your first document via
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein URL http://localhost/ (when you built and installed Apache as
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein root or at least used the --without-confadjust option) or
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein http://localhost:8080/ (when you built and installed Apache as a
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein regular user). Then stop the server again by running:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb $ PREFIX/bin/apachectl stop
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 7. Customizing the package
750f77ade4110c6b2315d6b9e9c22f643914d87drbb -----------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Finally you can customize your Apache HTTP server by editing the
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein configuration files under PREFIX/conf/.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein $ vi PREFIX/conf/httpd.conf
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein Have a look at the Apache manual under docs/manual/ or
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein http://httpd.apache.org/docs/ for a complete reference of
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein available configuration directives.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 8. Preparing the system
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --------------------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein Proper operation of a public HTTP server requires at least the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein following:
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein 1. A correctly working TCP/IP layer, since HTTP is implemented on
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein top of TCP/IP. Although modern Unix platforms have good
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein networking layers, always make sure you have all official
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein vendor patches referring to the network layer applied.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 2. Accurate time keeping, since elements of the HTTP protocol are
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein expressed as the time of day. So, it's time to investigate
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein setting some time synchronization facility on your
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein system. Usually the ntpdate or xntpd programs are used for
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein this purpose which are based on the Network Time Protocol
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein (NTP). See the Usenet newsgroup comp.protocols.time.ntp and
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein the NTP homepage at http://www.eecis.udel.edu/~ntp/ for more
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein details about NTP software and public time servers.
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb 9. Contacts
750f77ade4110c6b2315d6b9e9c22f643914d87drbb --------
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein o If you want to be informed about new code releases, bug fixes,
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein security fixes, general news and information about the Apache
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein server subscribe to the apache-announce mailing list as
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein described under http://httpd.apache.org/announcelist.html
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein o If you want freely available support for running Apache please
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein join the Apache user community by subscribing at least to the
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein following USENET newsgroup: comp.infosystems.www.servers.unix
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein o If you want commercial support for running Apache please
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein contact one of the companies and contractors which are listed
a3dcc79269b61a900fccff711c8dd63fc28382e7gstein at http://httpd.apache.org/info/support.cgi
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o If you have a concrete bug report for Apache please go to the
750f77ade4110c6b2315d6b9e9c22f643914d87drbb Apache Group Bug Database and submit your report:
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein http://httpd.apache.org/bug_report.html
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
750f77ade4110c6b2315d6b9e9c22f643914d87drbb o If you want to participate in actively developing Apache please
750f77ade4110c6b2315d6b9e9c22f643914d87drbb subscribe to the `new-httpd' mailing list as described at
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein http://www.apache.org/foundation/mailinglists.html
750f77ade4110c6b2315d6b9e9c22f643914d87drbb
105475009f541187ba7a14a367547d9404c578befielding Thanks for running Apache httpd.
3e5667f3bea0b417d0133534d960c5b86c63cf5cgstein
750f77ade4110c6b2315d6b9e9c22f643914d87drbb The Apache Group
750f77ade4110c6b2315d6b9e9c22f643914d87drbb http://www.apache.org/