"Fossies" - the Fresh Open Source Software Archive

Member "mod_chroot-0.5/INSTALL" (12 Jun 2005, 3451 Bytes) of package /linux/www/apache_httpd_modules/old/mod_chroot-0.5.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1                                    mod_chroot
    2 
    3 Building
    4 
    5    There are two ways to build mod_chroot - compile Apache with mod_chroot
    6    (static), or build a Dynamic Shared Object (DSO). Please remember that you
    7    still need to configure mod_chroot to take advantage of it.
    8 
    9 Building mod_chroot: Apache 1.3 static module
   10 
   11     1. Go to Apache source directory and type
   12 
   13  ./configure --add-module /usr/src/mod_chroot-x.y/src/apache13/mod_chroot.c
   14 
   15        Replace /usr/src with a directory where you unpacked the tarball. Add
   16        other configure options if needed.
   17     2. Compile and install Apache
   18 
   19  make && make install
   20 
   21     3. Start Apache with mod_chroot built in
   22 
   23  apachectl start
   24 
   25 Building mod_chroot: Apache 1.3 dynamic module (DSO)
   26 
   27    You will need apxs and Apache headers. If you compiled Apache from source
   28    you already have these headers. If you use Debian, you need to install
   29    apache-dev.
   30 
   31     1. Go to mod_chroot source directory and type:
   32 
   33  apxs -cia mod_chroot.c
   34 
   35     2. Start Apache
   36 
   37  apachectl start
   38 
   39 Building mod_chroot: Apache 2.0 dynamic module (DSO)
   40 
   41    You will need apxs (shipped as apxs2 by some distributors) and Apache
   42    headers. If you compiled Apache from source you already have these
   43    headers. If you use Debian, you need to install apache2-prefork-dev or
   44    apache2-threaded-dev.
   45 
   46     1. Go to mod_chroot source directory and type:
   47 
   48  apxs -cia mod_chroot.c
   49 
   50        Yes, that's the same source file as for Apache 1.3. Your Apache
   51        version will be detected automagically, just remember to use the right
   52        apxs if you have both Apache 1.3 and Apache 2.0 installed.
   53     2. Start Apache
   54 
   55  apachectl start
   56 
   57 Configuration (Apache 1.3 and Apache 2.0)
   58 
   59    mod_chroot provides only one configuration directive - ChrootDir. It can
   60    only be used in main server configuration. You can't put ChrootDir inside
   61    a <Directory>, <Files>, <Location>, <VirtualHost> sections or .htaccess
   62    files. Example: if you store your www files in /var/www and you want to
   63    make it a "virtual root", put
   64 
   65  ChrootDir /var/www
   66 
   67    in httpd.conf. Remember that ChrootDir affects DocumentRoot: if you had
   68    DocumentRoot pointing to "/var/www", you should now change it to "/" -
   69    otherwise Apache will be looking for "/var/www" inside of your root.
   70 
   71    If you're using mod_chroot with Apache 2, you'll probably have to tweak
   72    your httpd.conf a little more. Please read Apache 2.0 notes.
   73 
   74 Module ordering
   75 
   76    This section only applies to Apache 1.3. Apache 2.0 handles module
   77    ordering internally
   78 
   79    Apache needs access to the whole filesystem during startup. That's why
   80    mod_chroot must be loaded as the last one - after all other modules are
   81    initialized and ready. To accomplish this, you need to put a
   82    LoadModule/AddModule line for mod_chroot as the first one - Apache modules
   83    are loaded/activated in reverse order.
   84 
   85    If you compiled all Apache modules as DSOs, this is easy. Just put
   86 
   87  LoadModule chroot_module /usr/lib/apache/1.3/mod_chroot.so
   88 
   89    before all other LoadModule lines. Remember to replace the second argument
   90    with a real path to mod_chroot.so
   91 
   92    If you have some static modules (and mod_chroot is compiled into Apache),
   93    you may need to use ClearModuleList to put mod_chroot at the beginning of
   94    the list, followed by other static modules you need.
   95 
   96  ClearModuleList
   97  AddModule mod_chroot.c
   98  AddModule ...
   99  AddModule ...
  100 
  101    You can get a list of all builtin modules with
  102 
  103  httpd -l