home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / apac_139.zip / README.configure < prev    next >
Text File  |  1999-02-07  |  12KB  |  306 lines

  1.                               
  2.   APACHE CONFIGURATION
  3.  
  4.   Apache 1.3 Autoconf-style Interface (APACI)
  5.   ===========================================
  6.  
  7.   APACI is an Autoconf-style interface for the Unix side of the Apache 1.3
  8.   HTTP server source distribution. It is actually not GNU Autoconf-based, i.e.
  9.   the GNU Autoconf package itself is not used. Instead APACI just provides a
  10.   similar batch configuration interface and a corresponding out-of-the-box
  11.   build and installation procedure.
  12.  
  13.   The basic goal is to provide the following commonly known and expected
  14.   procedure for out-of-the-box building and installing a package like Apache:
  15.  
  16.     $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  17.     $ ./configure --prefix=PREFIX [...]
  18.     $ make
  19.     $ make install
  20.   
  21.   NOTE: PREFIX is not the string "PREFIX". Instead use the Unix
  22.         filesystem path under which Apache should be installed. For
  23.         instance use "/usr/local/apache" for PREFIX above.
  24.  
  25.   After these steps Apache 1.3 is completely installed under PREFIX and
  26.   already initially configured, so you can immediately fire it up the first
  27.   time via
  28.  
  29.     $ PREFIX/sbin/apachectl start
  30.  
  31.   to get your first success event with the Apache HTTP server without having
  32.   to fiddle around with various options for a long time. On the other hand
  33.   APACI provides a lot of options to adjust the build and installation process
  34.   for flexibly customizing your Apache installation. So, APACI provides both:
  35.   Out-of-the-box building and installation for the impatient and powerful
  36.   custom configuration for the experts.
  37.  
  38.   Detailed Description
  39.   ====================
  40.  
  41.   For a detailed description of all available APACI options please read the
  42.   file INSTALL or at least run the command
  43.  
  44.      $ ./configure --help
  45.  
  46.   for a compact one-page summary of the possibilities you have. Additionally
  47.   you can let you be motivated by the following examples.
  48.  
  49.   Examples
  50.   ========
  51.  
  52.   In the following typical or even interesting variants of the available
  53.   configuration steps are shown to give you an impression what APACI is good
  54.   for and what APACI can do for you to be able to install Apache without much
  55.   pain.
  56.  
  57.   Standard installation
  58.   ---------------------
  59.  
  60.   The standard installation is done via
  61.  
  62.     $ ./configure --prefix=/path/to/apache
  63.     $ make
  64.     $ make install
  65.  
  66.   This builds Apache 1.3 with the standard set of enabled modules
  67.   (automatically determined from src/Configuration.tmpl) with a GNU-conforming
  68.   subdirectory layout under /path/to/apache. For using the old Apache 1.2
  69.   subdirectory layout additionally use the --compat option:
  70.  
  71.     $ ./configure --compat --prefix=/path/to/apache
  72.     $ make
  73.     $ make install
  74.  
  75.   If you are not sure which directory layout you want, you can use the
  76.   --layout option. It displays the directory layout which would be used but
  77.   immediately exits without configuring anything. Examples:
  78.  
  79.     $ ./configure --layout
  80.     $ ./configure --prefix=/path/to/apache --layout
  81.     $ ./configure --compat --prefix=/path/to/apache --layout
  82.  
  83.   Additionally if some of the shown paths still don't fit for your particular
  84.   situation, you can use the --bindir, --sbindir, --libexecdir, --mandir,
  85.   --sysconfdir, --datadir, --localstatedir, --runtimedir, --logfiledir and
  86.   --proxycachedir options to adjust the layout as required. Always check with
  87.   --layout the resulting directory layout which would be used for
  88.   installation.
  89.  
  90.   suEXEC support
  91.   --------------
  92.  
  93.   The suEXEC feature of Apache provides a mechanism to run CGI and SSI
  94.   programs under the user and group id of the owner of the program. It is
  95.   neither installed nor configured per default for Apache 1.3, but APACI
  96.   supports it with additional options:
  97.  
  98.      $ ./configure --prefix=/path/to/apache \
  99.                    --enable-suexec \
  100.                    --suexec-caller=www \
  101.                    --suexec-userdir=.www \
  102.                    --suexec-docroot=/path/to/root/dir \
  103.                    --suexec-logfile=/path/to/logdir/suexec_log \
  104.                    --suexec-uidmin=1000 \
  105.                    --suexec-gidmin=1000 \
  106.                    --suexec-safepath="/bin:/usr/bin"
  107.      $ make
  108.      $ make install
  109.  
  110.   This automatically builds and installs Apache 1.3 with suEXEC support for
  111.   the caller uid "www" and the user's homedir subdirs ".www". The default
  112.   paths for --suexec-docroot is the value from the --datadir option with
  113.   the suffix "/htdocs" and the --logfiledir value with the suffix
  114.   "/suexec_log" for the --suexec-logfile option. The access paths for the
  115.   suexec program are automatically adjusted and the suexec program is
  116.   installed, so Apache can find it on startup.
  117.  
  118.   Building multiple platforms in parallel
  119.   ---------------------------------------
  120.  
  121.   When you want to compile Apache for multiple platforms in parallel it is
  122.   useful to share the source tree (usually via NFS, AFS or DFS) but build the
  123.   object files in separated subtrees. This can be accomplished by letting
  124.   APACI create a source shadow tree and build there:
  125.  
  126.     $ ./configure --shadow --prefix=/path/to/apache
  127.     $ make
  128.     $ make install
  129.  
  130.   Then APACI first determines the GNU platform triple, creates a shadow tree
  131.   in src.<gnu-triple> plus corresponding Makefile.<gnu-triple> and then
  132.   performs the complete build process inside this shadow tree.
  133.  
  134.   Dynamic Shared Object (DSO) support
  135.   -----------------------------------
  136.  
  137.   Apache 1.3 supports building modules as shared objects on all major Unix
  138.   platforms (see section "Supported Platforms" in document
  139.   htdocs/manual/dso.html for details).  APACI has a nice way of enabling the
  140.   building of DSO-based modules and automatically installing them:
  141.  
  142.     $ ./configure --prefix=/path/to/apache \
  143.                   --enable-module=rewrite \
  144.                   --enable-shared=rewrite 
  145.     $ make
  146.     $ make install
  147.  
  148.   This builds and installs Apache with the default configuration except that
  149.   it adds the mod_rewrite module and automatically builds and installs it as a
  150.   DSO, so it is optionally available for loading under runtime.  To make your
  151.   life even more easy APACI additionally inserts a corresponding `LoadModule'
  152.   line into the httpd.conf file in the installation phase.
  153.  
  154.   APACI also supports a variant of the --enable-shared option:
  155.  
  156.     $ ./configure --prefix=/path/to/apache \
  157.                   --enable-shared=max
  158.     $ make
  159.     $ make install
  160.  
  161.   This enables shared object building for the maximum of modules, i.e. all
  162.   enabled modules (--enable-module or the default set) except for mod_so
  163.   itself (the bootstrapping module for DSO support). So, to build a
  164.   full-powered Apache with maximum flexibility by building and installing most
  165.   of the modules, you can use:
  166.  
  167.     $ ./configure --prefix=/path/to/apache \
  168.                   --enable-module=most \
  169.                   --enable-shared=max
  170.     $ make
  171.     $ make install
  172.  
  173.   This first enables most of the modules (all modules except some problematic
  174.   ones like mod_auth_db which needs third party libraries not available on
  175.   every platform or mod_log_agent and mod_log_referer which are deprecated)
  176.   and then enables DSO support for all of them. This way you get all these
  177.   modules installed and you then can decide under runtime (via the
  178.   `LoadModule') directives which ones are actually used. Especially a very
  179.   useful for vendor package maintainers to provide a flexible Apache package.
  180.  
  181.   On-the-fly added additional/private module
  182.   ------------------------------------------
  183.  
  184.   For Apache there are a lot of modules flying around on the net which solve
  185.   particular problems. For a good reference see the Apache Module Registory at
  186.   http://modules.apache.org/ and the Apache Group's contribution directory at
  187.   http://www.apache.org/dist/contrib/modules/. These modules usually come in a
  188.   file named mod_foo.c. APACI supports adding these sources on-the-fly to the
  189.   build process:
  190.  
  191.     $ ./configure --prefix=/path/to/apache \
  192.                   --add-module=/path/to/mod_foo.c
  193.     $ make
  194.     $ make install
  195.  
  196.   This automatically copies mod_foo.c to src/modules/extra/, activates it in
  197.   the configuration and builds Apache with it. A very useful way is to combine
  198.   this with the DSO support:
  199.  
  200.     $ ./configure --prefix=/path/to/apache \
  201.                   --add-module=/path/to/mod_foo.c \
  202.                   --enable-shared=foo
  203.     $ make
  204.     $ make install
  205.  
  206.   This builds and installs Apache with the default set of modules, but
  207.   additionally builds mod_foo as a DSO and adds a `LoadModule' line to the
  208.   httpd.conf file to activate it for loading under runtime.
  209.  
  210.   Apache and mod_perl
  211.   -------------------
  212.  
  213.   The Apache/Perl integration project (http://perl.apache.org/) from Doug
  214.   MacEachern <dougm@perl.apache.org> is a very powerful approach to integrate
  215.   a Perl 5 interpreter into the Apache HTTP server both for running Perl
  216.   programs and for programming Apache modules in Perl. The distribution
  217.   mod_perl-1.XX.tar.gz can be found on http://perl.apache.org/src/. Here is
  218.   how you can build and install Apache with mod_perl:
  219.  
  220.     $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  221.     $ gunzip <mod_perl-1.XX.tar.gz | tar xvf -
  222.     $ cd mod_perl-1.XX
  223.     $ perl Makefile.PL APACHE_SRC=../apache_1.3.X/src \
  224.                        DO_HTTPD=1 USE_APACI=1 \
  225.                        [EVERYTHING=1 ...]
  226.     $ make
  227.     $ make install
  228.  
  229.     [optionally you now have the chance to prepare or add more 
  230.      third-party modules to the Apache source tree]
  231.  
  232.     $ cd ../apache_1.3.X
  233.     $ ./configure --prefix=/path/to/apache \
  234.                   --activate-module=src/modules/perl/libperl.a \
  235.                   [--enable-shared=perl]
  236.     $ make 
  237.     $ make install
  238.  
  239.   Apache and PHP
  240.   --------------
  241.  
  242.   The PHP language (http://www.php.net) is an HTML-embedded scripting language 
  243.   which can be directly integrated into the Apache HTTP server for powerful HTML 
  244.   scripting.  The package can be found at http://www.php.net/download-php.php3. 
  245.  
  246.   1. How you can install Apache with a statically linked PHP:
  247.  
  248.     $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  249.     $ gunzip <php-3.0.tar.gz | tar xvf -
  250.     $ cd apache_1.3.X
  251.     $ ./configure --prefix=/path/to/apache
  252.     $ cd ../php-3.0
  253.     $ ./configure --with-apache=../apache_1.3.X
  254.     $ make
  255.     $ make install
  256.  
  257.     [optionally you now have the chance to prepare or add more 
  258.      third-party modules to the Apache source tree]
  259.  
  260.     $ cd ../apache_1.3.X
  261.     $ ./configure --prefix=/path/to/apache \
  262.                   --activate-module=src/modules/php3/libphp3.a
  263.     $ make 
  264.     $ make install
  265.     
  266.   2. How you can install Apache with a dynamically linked PHP:
  267.  
  268.     $ gunzip <apache_1.3.X.tar.gz | tar xvf -
  269.     $ gunzip <php-3.0.tar.gz | tar xvf -
  270.     $ cd apache_1.3.X
  271.     $ ./configure --prefix=/path/to/apache
  272.     $ cd ../php-3.0
  273.     $ ./configure --with-shared-apache=../apache_1.3.X
  274.     $ make
  275.     $ make install
  276.  
  277.     [optionally you now have the chance to prepare or add more 
  278.      third-party modules to the Apache source tree]
  279.  
  280.     $ cd ../apache_1.3.X
  281.     $ ./configure --prefix=/path/to/apache \
  282.                   --activate-module=src/modules/php3/libphp3.a \
  283.                   --enable-shared=php3
  284.     $ make 
  285.     $ make install
  286.  
  287.   3. You can also use APXS:
  288.  
  289.     $ cd apache-1.3.X
  290.     $ ./configure --prefix=/path/to/apache --enable-shared=max
  291.     $ make
  292.     $ make install
  293.  
  294.     $ cd php-3.0.X
  295.     $ ./configure --with-apxs=/path/to/apache/bin/apxs \
  296.                   --with-config-file-path=/path/to/apache
  297.     $ make
  298.     $ make install
  299.  
  300.   At this point don't forget to edit your conf/httpd.conf file and
  301.   make sure the file contains the line:
  302.  
  303.     AddType application/x-httpd-php3 .php3
  304.  
  305.   Then restart your server.
  306.