Download
Mailing lists
FAQ
Help: compiling mod_backhand
This is pretty much verbatim from the INSTALL file included in the source distribution.

For those of you who don't have perl... Hours were invested making sure that all of this can be done with standard unix utilities (sh, cut, sed, wc, dc)

mod_backhand is not very large, so it doesn't have a stand alone install process.

Run ./precompile to start the whole process off. Once this script completes successfully, you can just go to the apache source tree and ./configure like you would have without mod_backhand. (you will need to --enable some things, but an example is provided)

./precompile installs mod_backhand in your apache source tree and updates the various files to allow you to use the ./configure script accompanying apache.

An example ./configure command line is displayed after successfully running the precompile script.

Have fun!

-- Theo Schlossnagle


The following is an excerpt from a vanilla install on a Linux machine.
# cd /var/tmp
# ls
apache_1.3.6.tar.gz
mod_backhand.tar.gz
# gzip -d < apache_1.3.6.tar.gz | tar xf -
# gzip -d < mod_backhand.tar.gz | tar xf -
# ls
apache_1.3.6
apache_1.3.6.tar.gz
mod_backhand-1.0
mod_backhand.tar.gz
# cd mod_backhand-1.0
# ./precompile ../apache_1.3.6/
Copying source into apache tree...
Copying sample cgi script and logo into htdocs directory...
Adding to Apache's Configuration.tmpl...
Nullifying extra shared libraries for Linux
Modifying httpd.conf-dist...
        creating insertion....
        integrating insertion with original...
Updating Makefile.tmpl...


Now change to the apache source directory:
        ../apache_1.3.6/
And do a ./configure...

If you want to enable backhand (why would you have done this is you didn't)
then add:  --enable-module=backhand --enable-shared=backhand
to your apache configure command.  For eaxmple, I use:

   ./configure --prefix=/var/backhand --enable-module=so \
         --enable-module=rewrite --enable-shared=rewrite \
         --enable-module=speling --enable-shared=speling \
         --enable-module=info --enable-shared=info \
         --enable-module=include --enable-shared=include \
         --enable-module=status --enable-shared=status \
         --enable-module=backhand --enable-shared=backhand
# cd ../apache_1.3.6
# ./configure --prefix=/var/backhand --enable-module=so \
         --enable-module=rewrite --enable-shared=rewrite \
         --enable-module=speling --enable-shared=speling \
         --enable-module=info --enable-shared=info \      
         --enable-module=include --enable-shared=include \
         --enable-module=status --enable-shared=status \  
         --enable-module=backhand --enable-shared=backhand
Configuring for Apache, Version 1.3.6
 + using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Linux platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
    o rewrite_module uses ConfigStart/End
 + using -lndbm for DBM support
      enabling DBM support for mod_rewrite
 + using -ldl for vendor DSO support
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/backhand
Creating Makefile in src/modules/standard
# make

(this is excluded for brevity)

# make install

(also excluded for brevity)


The following is an excerpt from a vanilla install on a Solaris machine.
# cd /var/tmp
# ls
apache_1.3.6.tar.gz
mod_backhand.tar.gz
# gzip -d < apache_1.3.6.tar.gz | tar xf -
# gzip -d < mod_backhand.tar.gz | tar xf -
# ls
apache_1.3.6
apache_1.3.6.tar.gz
mod_backhand-1.0
mod_backhand.tar.gz
# cd mod_backhand-1.0
# ./precompile ../apache_1.3.6/
Copying source into apache tree...
Copying sample cgi script and logo into htdocs directory...
Adding to Apache's Configuration.tmpl...
Setting extra shared libraries for Solaris (-lkstat)
Modifying httpd.conf-dist...
        creating insertion....
        integrating insertion with original...
Updating Makefile.tmpl...

=========================== SOLARIS NOTE ===============================

   Backhand uses shared memory and the httpd children processes must
attach to that memory.  We choose to allocate that shared memory with
user and group set to the apache user and group.  All shared memory
allocations happen during configuration.
   On Solaris, the User and Group directives in httpd.conf must be
specified before the LoadModule and AddModule Directives for
mod_backhand.
   If you do not do this, backhand will have no resource information for
the cluster and will not operate correctly.  You will see a error in
the apache error logs:

    [error] (22)Invalid argument: shmctl(., IPC_SET, [-1,-1])
        could not set segment #xxxx

   To remedy this, simply move the User and Group directives above the
LoadModule and ShareModule directives

    


Now change to the apache source directory:
        ../apache_1.3.6/
And do a ./configure...

If you want to enable backhand (why would you have done this is you didn't)
then add:  --enable-module=backhand --enable-shared=backhand
to your apache configure command.  For eaxmple, I use:

   ./configure --prefix=/var/backhand --enable-module=so \
         --enable-module=rewrite --enable-shared=rewrite \
         --enable-module=speling --enable-shared=speling \
         --enable-module=info --enable-shared=info \
         --enable-module=include --enable-shared=include \
         --enable-module=status --enable-shared=status \
         --enable-module=backhand --enable-shared=backhand
# cd ../apache_1.3.6
# ./configure --prefix=/var/backhand --enable-module=so \
         --enable-module=rewrite --enable-shared=rewrite \
         --enable-module=speling --enable-shared=speling \
         --enable-module=info --enable-shared=info \      
         --enable-module=include --enable-shared=include \
         --enable-module=status --enable-shared=status \  
         --enable-module=backhand --enable-shared=backhand
Configuring for Apache, Version 1.3.6
 + using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
Creating Makefile in src
 + configured for Solaris 260 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
    o rewrite_module uses ConfigStart/End
      enabling DBM support for mod_rewrite
 + using -ldl for vendor DSO support
 + doing sanity check on compiler and options
Creating Makefile in src/support
Creating Makefile in src/main
Creating Makefile in src/ap
Creating Makefile in src/regex
Creating Makefile in src/os/unix
Creating Makefile in src/modules/backhand
Creating Makefile in src/modules/standard
# make

(this is excluded for brevity)

# make install

(also excluded for brevity)

Copyright © 1999 Theo Schlossnagle. All rights reserved.