httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Voting: APACI
Date Wed, 25 Mar 1998 11:13:13 GMT

Voting APACI
------------

Ok, APACI is old enough and now it's time to either consider it to included
for Apache 1.3 or finally ignored for the Apache Group. I've added a very long
description to apache-1.3/STATUS to give you the chance to make a fair
decision, even if you still don't know anything about APACI: For thise of
you who don't want to try it out theirself (perhaps less time) I'll append
the APACI README and INSTALL file to this posting.

Please add your votes to the STATUS file. Thanks.

Greetings,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
      _    ____   _    ____ ___ 
     / \  |  _ \ / \  / ___|_ _|
    / _ \ | |_) / _ \| |    | | 
   / ___ \|  __/ ___ \ |___ | | 
  /_/   \_\_| /_/   \_\____|___|
                              
  APache 1.3 AutoConf Interface (APACI)
  =====================================

  APACI is an Autoconf-style interface for the Unix side of the Apache 1.3
  HTTP server source distribution. It is _NOT_ GNU Autoconf-based, i.e.  no
  GNU Autoconf stuff is actually used. Instead APACI just provides a similar
  batch configuration interface and a corresponding out-of-the-box
  installation procedure.

  The basic goal is to provide the following commonly known and expected
  procedure for out-of-the-box building and installing a package like Apache:

    $ gunzip <apache-1.3bX.tar.gz | tar xvf -
    $ ./configure --prefix=/path/to/apache [...]
    $ make
    $ make install
  
  After these steps Apache 1.3 is completely installed and already initially
  configured, so you can immediately fire it up the first time via

    $ /path/to/apache/sbin/apachectl start

  to get your first success event with the Apache HTTP server without having
  to fiddle around a long time. On the other hand APACI provides a lot of
  options to adjust the build and installation process for flexible
  customizing your Apache installation. So, APACI provides both:
  Out-of-the-box building and installation for the impatient and powerful
  custom configuration for the experts.

  Examples
  ========

  In the following typical or even interesting variants of the available
  configuration step are shown to give you an impression what APACI is good
  for.

  Standard installation
  ---------------------

  The standard installation is done via

    $ ./configure --prefix=/path/to/apache
    $ make
    $ make install

  This builds Apache 1.3 with the standard set of enabled modules
  (automatically determined from SRC/Configuration.tmpl) under a
  GNU-conforming subdirectory layout under /path/to/apache. For using the old
  Apache 1.2 subdirectory layout additionally use the --compat option:

    $ ./configure --compat --prefix=/path/to/apache
    $ make
    $ make install

  Dynamic Shared Object (DSO) support
  -----------------------------------

  Apache 1.3 support building modules as shared objects on all major platforms
  like FreeBSD, Linux, SunOS, Solaris, IRIX, OSF/1 and UnixWare. APACI has a
  nice way of enabling and automatically installing these shared objects:

    $ ./configure --prefix=/path/to/apache \
                  --enable-module=rewrite \
                  --enable-shared=rewrite 
    $ make
    $ make install

  This builds and installs Apache with the default configuration except that
  it adds mod_rewrite and automatically builds and installs mod_rewrite as a
  shared object, so it is optionally available for loading under runtime.

  APACI also support a variant of the --enable-shared option:

    $ ./configure --prefix=/path/to/apache \
                  --enable-shared=max
    $ make
    $ make install

  This enables shared object building for the maximum of modules, i.e.  all
  enables modules (--enable-module or the default set) except for mod_so
  itself (the bootstrapping module for shared object support). To build
  a full-powered Apache with maximum flexiblity by building and installing
  most of the modules, you can use:

    $ ./configure --prefix=/path/to/apache \
                  --enable-modules=most \
                  --enable-shared=max
    $ make
    $ make install

  This is first enables most of the modules (all modules except some
  problematic ones like mod_auth_db which needs third party libraries not
  available on every platform) and then enables shared object support for all
  of them. This way you get all these modules installed and you then can
  configure via the "LoadModule" directive which ones are actually used. 

  On-the-fly added additional/private module
  ------------------------------------------

  For Apache there are a lot of modules flying around on the net which solve
  particular problems. For a good reference see the Apache Module Registory at
  http://www.covalent.net/module_registry/ and the contribution directory at
  http://www.apache.org/dist/contrib/modules/. These modules usually come in a
  file named mod_foo.c. APACI support adding these sources on-the-fly to the
  build process:

    $ ./configure --prefix=/path/to/apache \
                  --add-module=/path/to/mod_foo.c
    $ make
    $ make install

  This automatically adds mod_foo.c to SRC/modules/extra/, enables it in the
  configuration and builds Apache with it. A useful way is to combine this
  with the shared object support:

    $ ./configure --prefix=/path/to/apache \
                  --add-module=/path/to/mod_foo.c \
                  --enable-shared=foo
    $ make
    $ make install

  This builds and installs Apache with the default set of modules, but
  additionally builds mod_foo as a shared object and adds a "LoadModule" line
  to the httpd.conf file, so later you can enable your own module under
  runtime.

  mod_perl Support
  ----------------

  The Apache/Perl integration project (http://perl.apache.org/) from Doug
  McEachern is a very powerful approach to integrate a Perl 5 interpreter into
  the Apache HTTP server both for running Perl programs and for programming
  Apache modules in Perl. The distribution mod_perl-1.XX.tar.gz can be found
  on http://perl.apache.org/src/ and APACI has support for adding its Apache
  part on-the-fly to the building process of Apache 1.3:

    $ ./configure --prefix=/path/to/apache \
                  --with-perl=/path/to/bin/perl \
                  --add-modperl=/path/to/mod_perl-1.XX
                  --enable-shared=perl
    $ make
    $ make install

  This automatically builds and installs Apache 1.3 with mod_perl 1.XX as a
  shared object under /tmp/apache. After additionally installing the Perl side
  of mod_perl via

    $ cd /path/to/mod_perl-1.XX
    $ /path/to/bin/perl Makefile.PL NO_HTTPD=1
    $ make all install

  you can enable the created "LoadModule" line in /tmp/apache/etc/httpd.conf
  and fire up Apache with mod_perl.

  suEXEC support
  --------------

  The suEXEC feature of Apache provides a mechanism to run CGI and SSI
  programs under the user and group id of the owner of the program. It is
  neither installed nor configured per default for Apache 1.3, but APACI
  supports it.

     $ ./configure --prefix=/path/to/apache \
                   --enable-suexec \
                   --suexec-caller=www \
                   --suexec-userdir=.www
     $ make
     $ make install

  This automatically builds and installs Apache 1.3 with suEXEC support for
  the caller uid "www" and the user subdirs ".www".  The access paths for the
  suexec program are automatically adjusted and the suexec program is
  installed, so Apachecan find it on startup.

  Building multiple platforms in parallel
  ---------------------------------------

  When you want to compile Apache for multiple platforms in parallel it is
  useful to share the source tree but build the object files in separated
  subtrees. This can be accomplished by letting APACI compile in a shadow tree
  like this:

    $ ./configure --shadow --prefix=/path/to/apache
    $ make
    $ make install

  Then APACI runs the src/helpers/GuessOS script to determine the GNU triple
  for the underlaying platform, creates a shadow tree in src.<gnu-triple> and
  then performs the complete build process in this shadow tree.


 Installing the Apache 1.3 HTTP server with APACI
 ================================================

 1. Overview for the impatient
    --------------------------

    $ ./configure --prefix=PREFIX
    $ make
    $ make install
    $ PREFIX/sbin/apachectl start

 2. Requirements
    ------------

    The following requirements exist for building Apache:

    o  Disk Space: 
       Make sure you have 8 MB of temporary free disk space.  After
       installation Apache occupies approximately 3 MB of disk space.

    o  ANSI-C Compiler: 
       Make sure you have an ANSI-C compiler installed.  The GNU C compiler
       (GCC) from the Free Software Foundation (FSF) is recommended. If you
       don't have GCC then at least make sure your vendors compiler is ANSI
       compliant.  You can find the homepage of GNU on
       http://www.gnu.ai.mit.edu/ and the GCC distribution on
       http://www.gnu.ai.mit.edu/order/ftp.html .

 3. Configuring the source tree
    ---------------------------

    The next step is to configure the Apache source tree for your particular
    system/platform. The important information here is to set a location
    prefix where Apache is to be installed later, because Apache has to be
    configured for this location to work correctly.

        $ [CC=...] [OPTIM=...] [CFLAGS=...] [CFLAGS_SHLIB=...]
          [LDFLAGS=...] [LDFLAGS_SHLIB=...]
          [LIBS=...] [INCLUDES=...] 
          [RANLIB=...] [LDFLAGS_SHLIB_EXPORT=...] 
          ./configure [--prefix=DIR]
                      [--exec-prefix=PREFIX]
                      [--bindir=EPREFIX]
                      [--sbindir=DIR]
                      [--libexecdir=DIR]
                      [--mandir=DIR]
                      [--sysconfdir=DIR]
                      [--datadir=DIR]
                      [--localstatedir=DIR]
                      [--compat]
                      [--display-layout]
                      [--enable-rule=RULENAME]
                      [--disable-rule=RULENAME]
                      [--enable-module=MODULENAME]
                      [--disable-module=MODULENAME]
                      [--enable-shared=MODULENAME]
                      [--disable-shared=MODULENAME]
                      [--add-module=FILE]
                      [--add-modperl=DIR]
                      [--enable-suexec]
                      [--suexec-caller=UID]
                      [--suexec-userdir=SUBDIR]
                      [--shadow]
                      [--quiet]
                      [--verbose]

    Use the CC, OPTIM, CFLAGS, CFLAGS_SHLIB, LDFLAGS, LDFLAGS_SHLIB, LIBS,
    INCLUDES, RANLIB and LDFLAGS_SHLIB_EXPORT environment variables to
    override the corresponding default entries in the src/Configuration.tmpl
    file.

    Use the --prefix=PREFIX and --exec-prefix=EPREFIX options to configure
    Apache to use a particular installation prefix. The default is
    PREFIX=/usr/local/apache and EPREFIX=PREFIX.

    Use the --bindir=DIR, --sbindir=DIR, --libexecdir=DIR, --mandir=DIR,
    --sysconfdir=DIR, --datadir=DIR and --localstatedir=DIR option to change
    the path for a particular subdirectory of the installation tree. Defaults
    are bindir=EPREFIX/bin, sbindir=EPREFIX/sbin, libexecdir=EPREFIX/libexec,
    mandir=PREFIX/man, sysconfdir=PREFIX/etc, datadir=PREFIX/share and
    localstatedir=PREFIX/var.

    Use the --compat option to install Apache into a installation tree which
    has a similar layout than the one where Apache 1.2 was installed into.

    Use the --display-layout option to check the final installation path
    layout while fiddling with the above options.

    Use the --enable-rule=RULENAME and --disable-rule=RULENAME options to
    enable or disable a particular Rule from the Apache src/Configuration.tmpl
    file. The defaults (yes=enabled, no=disabled) can be seen when running
    `./configure --help'.

    Use the --enable-module=MODULENAME and --disable-module=MODULENAME options
    to enable or disable a particular Module from the Apache
    src/Configuration.tmpl file. The defaults (yes=enabled, no=disabled) can
    be seen when running `./configure --help'. There are two special
    MODULENAME variants: "all" for enabling or disabling all modules and
    "most" for enabling or disabling only these modules which are useable on
    all platforms.

    Use the --enable-shared=MODULENAME and --disable-shared=MODULENAME options
    to enable or disable the shared object support for a particular Module
    from the Apache src/Configuration.tmpl file. The defaults (yes=enabled,
    no=disabled) can be seen when running `./configure --help'. There are two
    special MODULENAME variants: "max" for enabling or disabling all modules
    except the bootstrapping module mod_so and "remain" for enabling or
    disabling only these modules which are still not enabled.

    Use the --add-module=FILE option to on-the-fly add a module to the Apache
    package build process. FILE has be a valid path to a C source file, i.e.
    FILE usually /path/to/mod_xxx.c 

    Use the --add-modperl=DIR option to on-the-fly add the Apache-part of the
    mod_perl source distribution to the Apache package build process. DIR has
    be a valid path to the mod_perl source tree.

    Use the --enable-suexec option to enable the suEXEC feature by building
    and installing the "suexec" support program. Use --suexec-caller=UID to
    set the allowed caller user id and --suexec-userdir=SUBDIR to set the user
    subdirectory for this feature.
    
    Use the --shadow option to let APACI create a shadow subtree of the source
    subtree. This is useful when you want to build for different platforms in
    parallel (usually through a NFS or AFS mounted filesystem).

    Use the --quiet option to disable all configuration verbose messages.

    Use the --verbose option to enable additional verbose messages.
    
 4. Building the package
    --------------------
    
    Now you can build the programs, manpages and include files which form the
    Apache package by running the command

       $ make 

    Please be patient, this takes approximately 5 minutes to complete under a
    Pentium-166/FreeBSD-2.1 system. 

 5. Installing the package
    ----------------------
    
    Now its time to install the package's programs under the installation
    prefix by running:

       $ make install

    For the paranoid hackers under us: The above command really installs under
    prefix _only_, i.e. no other stuff from your system is touched. 

 6. Testing the package
    -------------------

    Now you can fire up your Apache HTTP server by running

       $ PREFIX/sbin/apachectl start

    and then you should be able to request your first document via URL
    http://localhost/. Then stop the server again by running:
 
       $ PREFIX/sbin/apachectl stop

 7. Customizing the package
    -----------------------

    Finally you can customize your Apache HTTP server by editing the files
    under PREFIX/etc/.


Mime
View raw message