Apache
  Home arrow Apache arrow Page 8 - Building Apache the Way You Want It
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
APACHE

Building Apache the Way You Want It
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 11
    2005-08-18

    Table of Contents:
  • Building Apache the Way You Want It
  • Building Apache from Source
  • General Options
  • Enabling or Disabling Modules in Bulk
  • Changing the Module Order (Apache 1.3)
  • Building Apache from Source As an RPM (Apache 2)
  • Advanced Configuration
  • Determining Apache’s Locations Individually
  • Choosing a MultiProcessing Module (Apache 2)
  • Building Apache with suExec support
  • Configuring Apache 2 for Cross-Platform Builds
  • Configuring the Build Environment
  • Building Modules with apxs

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Building Apache the Way You Want It - Determining Apache’s Locations Individually
    (Page 8 of 13 )

    Each of Apache’s locations can also be set individually, including a few rare ones that aren’t (at least, as yet) permitted in the layout. The list of available options, with their defaults in the Apache layout, is detailed in Table 3-5.

    Table 3-5. Configuration Directives Relating to Locations

    Option

    Description

    --with-program-name=NAME (2.0) Installs name-associated files using the base name of

    --target=NAME (1.3)

    NAME. This changes the name of the Apache executable

    from httpd to NAME and also changes the default names

    of the configuration, scoreboard, process ID, and lock

    files—httpd.conf becomes NAME.conf, and apachectl

    becomes NAMEctl, and so on. This can be useful, along

    with --runtimedir for running a second instance of

    Apache with a different configuration in parallel with an

    existing one.

    The default is httpd. In Apache 1.3 this option is called

    --target, but in Apache 2 it has been renamed to

    --with-program-name to make way for the new portability

    options --target, --host, and --build.

    --prefix=PREFIX

    Installs architecture-independent files in PREFIX. This

    determines the primary installation location for Apache

    and the default value of the server root, for instance,

    /usr/local/apache under Unix. Most other locations

    default to subdirectories of this value.

    --exec-prefix=EPREFIX

    Installs architecture-dependent files (meaning

    principally compiled executables) in EPREFIX. This

    determines the root location of executable files, from

    which the --bindir, --sbindir, and --libexec directories

    are derived (if specified as relative values). It defaults to

    the same value as PREFIX if unspecified.

    --bindir=DIR

    Installs user executables and scripts in DIR. Usually

    located in the bin directory under EPREFIX.

    --sbindir=DIR

    Installs sys admin executables in DIR [EPRIFIX/sbin].

    --libexecdir=DIR

    Installs program executables in DIR. This defines the

    location of Apache’s dynamic modules, if any are

    installed. Usually located in the libexec (1.3) or modules

    (2.0) subdirectory under EPREFIX.

    --mandir=DIR

    Installs Unix manual pages for each of Apache’s

    executables in DIR. Usually located in the man directory

    under PREFIX. Not to be confused with --manualdir.

    --sysconfdir=DIR

    Installs configuration files such as httpd.conf and

    mime.types in DIR. Usually located in the conf directory

    under PREFIX.

    (Continued)

    Table 3-5. Configuration Directives Relating to Locations (Continued)  

    Option

    Description

    --datadir=DATADIR

    Installs read-only data files in DATADIR. This determines

    the root location of all nonlocal data files, from which the

    --installbuilddir, --errordir, --iconsdir, --htdocsdir,

    --manualdir, and --cgidir directories are derived, if

    specified as relative values. It defaults to the same value

    as PREFIX if unspecified.

    --errordir=DIR

    Installs custom error documents into DIR. These are

    referred to by ErrorDocument directives in the main

    configuration file and produce nicer, and multilingual,

    error messages than Apache’s built-in ones. Usually

    located in the error directory under DATADIR. New in

    Apache 2.

    --iconsdir=DIR

    Installs icons for directory indexing into DIR. AddIcon

    directives in the main configuration file refer to these.

    Usually located in the icons directory under DATADIR.

    New in Apache 1.3.10.

    --infodir=DIR

    Installs documentation in GNU "info" format into DIR.

    Apache itself doesn’t come with any information

    documentation, but third-party modules might. Not

    created by default but, is usually located in the info

    directory under DATADIR. New in Apache 2.

    --htdocsdir=DIR

    Installs the default Apache startup Web page into DIR.

    The master configuration uses this directory as the initial

    value for the DocumentRoot directive. New in Apache 1.3.10.

    --manualdir=DIR

    Installs Apache’s HTML documentation into DIR. Usually

    located in the manual directory under DATADIR. Not to be

    confused with --mandir. New in Apache 1.3.21.

    --cgidir=DIR

    Installs the standard Apache CGI scripts into DIR. Usually

    located in the cgi-bin directory under DATADIR. The

    master configuration file points to this directory via a

    ScriptAlias directive. New in Apache 1.3.10.

    --includedir=DIR

    Installs Apache’s header files in DIR. These are required

    by apxs to compile modules without the full Apache

    source tree available. Usually located in the include

    directory under PREFIX.

    --libdir=DIR

    Installs Apache’s nonmodule object libraries in DIR.

    Usually located in the lib directory under PREFIX. New in

    Apache 2.

    --localstatedir=LOCALDIR

    Installs modifiable data files in DIR. This defines where

    files that convey information about a particular instance

    of Apache are kept. It usually governs the locations of the

    runtime, log file, and proxy directories below. Usually the

    same as PREFIX.

    --runtimedir=DIR

    Installs run-time data in DIR. This determines the default

    locations of the process ID, scoreboard, and lock files.

    Usually located in the logs subdirectory under LOCALDIR.

    Table 3-5. Configuration Directives Relating to Locations (Continued)

    Option

    Description

    --logfiledir=DIR

    Installs log file data in DIR. This determines the default locations of the error and access logs. Usually located in the logs subdirectory under LOCALDIR.

    --proxycachedir=DIR

    Installs proxy cache data in DIR. This determines the default location of the proxy cache. Usually located in the proxy subdirectory under LOCALDIR.

    --sharedstatedir=DIR

    Installs shared modifiable data files in DIR. Not created by default, but usually the same as PREFIX. New in Apache 2.

    When considering this list, it’s worth remembering that the directory organization is actually an artifact of the layout definitions in config.layout and not an implicit default; there’s nothing that automatically decides that the bin and sbin directories are under EPREFIX. The same is true for DATADIR and LOCALSTATEDIR—both define paths that are only used as the basis for the default values of other options in config.layout. If you create your own layout that doesn’t make use of them, they have no significance.

    You can also combine a layout configuration with an individual location option. The configure script reads the layout first and then overrides it with individual options. For example, you can explicitly request the Apache layout and then override the sbin directory so it’s different from the normal bin directory:

    [1.3] $ ./configure --with-layout=Apache --sbindir=/usr/local/apache/sbin
    [2.0] $ ./configure --enable-layout=Apache --sbindir=/usr/local/apache/sbin

    As a final trick, you can actually use the variables in the layout definition as part of individual location options. For example, the --exec_prefix option can be accessed with $exec_prefix. You need to escape the dollar to prevent the shell from trying to evaluate it, so the second command in the previous code could be written more flexibly as this:

    $ ./configure --enable-layout=Apache --sbindir=\$exec_prefix/sbin

    You can do this for any of the values defined in config.layout, which allows you to customize any predefined layout without editing it.

    To check that you’ve got everything right, use the --show-layout option:

    $ ./configure --enable-layout=Apache --sbindir=\ $exec_prefix/sbin --show-layout

    This also has the benefit of providing the names of the values you can use in your own modifications (by prefixing them with a $).

    CAUTION This isn’t yet supported by the Apache 2 configure script.

    More Apache Articles
    More By Apress Publishing


       · This article (chapter) is better then most full books I have on Apache and I do have...
     

    Buy this book now. This article is from chapter three of the book Pro Apache third edition, written by Peter Wainwright (Apress, 2004; ISBN: 1590593006). Check it out at your favorite bookstore. Buy this book now.

       

    APACHE ARTICLES

    - Putting Apache in Jail
    - Containing Intrusions in Apache
    - Server Limits for Apache Security
    - Setting Permissions in Apache
    - Installing Apache
    - Apache Installation and Configuration
    - Apache Tapestry and Custom Components: DateI...
    - Tapestry and AJAX: Autocompleter and InlineE...
    - PropertySelection and IPropertySelectionMode...
    - The DatePicker and Shell Components of Apach...
    - Apache Tapestry: ASO and More Components
    - Apache Tapestry and DirectLink, IoC and DI
    - Making a CelebrityCollector with Apache Tape...
    - Apache Tapestry and Listener Methods, Condit...
    - The Properties of Tapestry Pages

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway