home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / WWW-HOWTO < prev    next >
Text File  |  1998-10-14  |  59KB  |  1,187 lines

  1.   Linux WWW HOWTO
  2.   by Wayne Leister, n3mtr@qis.net
  3.   v0.82, 19 November 1997
  4.  
  5.   This document contains information about setting up WWW services under
  6.   Linux (both server and client).  It tries not to be a in detail manual
  7.   but an overview and a good pointer to further information.
  8.  
  9.   1.  Introduction
  10.  
  11.   Many people are trying Linux because they are looking for a really
  12.   good Internet capable operating system.  Also, there are institutes,
  13.   universities, non-profits, and small businesses which want to set up
  14.   Internet sites on a small budget. This is where the WWW-HOWTO comes
  15.   in. This document explains how to set up clients and servers for the
  16.   largest part of the Internet - The World Wide Web.
  17.  
  18.   All prices in this document are stated in US dollars.  This document
  19.   assumes you are running Linux on an Intel platform.  Instructions and
  20.   product availability my vary from platform to platform.  There are
  21.   many links for downloading software in this document.  Whenever
  22.   possible use a mirror site for faster downloading and to keep the load
  23.   down on the main server.
  24.  
  25.   The US government forbids US companies from exporting encryption
  26.   stronger than 40 bit in strength.  Therefore US companies will usually
  27.   have two versions of software.  The import version will usually
  28.   support 128 bit, and the export only 40 bit.  This applies to web
  29.   browsers and servers supporting secure transactions.  Another name for
  30.   secure transactions is Secure Sockets Layer (SSL).  We will refer to
  31.   it as SSL for the rest of this document.
  32.  
  33.   1.1.  Copyright
  34.  
  35.   This document is Copyright (c) 1997 by Wayne Leister.  The original
  36.   author of this document was Peter Dreuw.(All versions prior to 0.8)
  37.  
  38.        This HOWTO is free documentation; you can redistribute it
  39.        and/or modify it under the terms of the GNU General Public
  40.        License as published by the Free Software Foundation; either
  41.        version 2 of the License, or (at your option) any later ver¡
  42.        sion.
  43.  
  44.        This document is distributed in the hope that it will be
  45.        useful, but without any warranty; without even the implied
  46.        warranty of merchantability or fitness for a particular pur¡
  47.        pose.  See the GNU General Public License for more details.
  48.  
  49.        You can obtain a copy of the GNU General Public License by
  50.        writing to the Free Software Foundation, Inc., 675 Mass Ave,
  51.        Cambridge, MA 02139, USA.
  52.  
  53.   Trademarks are owned by there respective owners.
  54.  
  55.   1.2.  Feedback
  56.  
  57.   Any feedback is welcome.  I do not claim to be an expert.  Some of
  58.   this information was taken from badly written web sites; there are
  59.   bound to be errors and omissions.  But make sure you have the latest
  60.   version before you send corrections; It may be fixed in the next
  61.   version (see the next section for where to get the latest version).
  62.   Send feedback to n3mtr@qis.net.
  63.  
  64.   1.3.  New versions of this Document
  65.  
  66.   New versions of this document can be retrieved in text format from
  67.   Sunsite at <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/WWW-HOWTO> and
  68.   almost any Linux mirror site.  You can view the latest HTML version on
  69.   the web at <http://sunsite.unc.edu/LDP/HOWTO/WWW-HOWTO.html>.  There
  70.   are also HTML versions available on Sunsite in a tar archive.
  71.  
  72.   2.  Setting up WWW client software
  73.  
  74.   The following chapter is dedicated to the setting up web browsers.
  75.   Please feel free to contact me, if your favorite web browser is not
  76.   mentioned here.   In this version of the document only a few of the
  77.   browsers have there own section, but I tried to include all of them
  78.   (all I could find) in the overview section.  In the future those
  79.   browsers that deserve there own section will have it.
  80.  
  81.   The overview section is designed to help you decide which browser to
  82.   use, and give you basic information on each browser.  The detail
  83.   section is designed to help you install, configure, and maintain the
  84.   browser.
  85.  
  86.   Personally, I prefer the Netscape; it is the only browser that keeps
  87.   up with the latest things in HTML.  For example, Frames, Java,
  88.   Javascript, style sheets, secure transactions, and layers.  Nothing is
  89.   worse than trying to visit a web site and finding out that you can't
  90.   view it because your browser doesn't support some new feature.
  91.  
  92.   However I use Lynx when I don't feel like firing up the X-
  93.   windows/Netscape monster.
  94.  
  95.   2.1.  Overview
  96.  
  97.      ``Navigator/Communicator''
  98.         Netscape Navigator is the only browser mentioned here, which is
  99.         capable of advanced HTML features.  Some of these features are
  100.         frames, Java, Javascript, automatic update, and layers.  It also
  101.         has news and mail capability.  But it is a resource hog; it
  102.         takes up lots of CPU time and memory.  It also sets up a
  103.         separate cache for each user wasting disk space.  Netscape is a
  104.         commercial product.  Companies have a 30 day trial period, but
  105.         there is no limit for individuals.  I would encourage you to
  106.         register anyway to support Netscape in there efforts against
  107.         Microsoft (and what is a measly $40US).  My guess is if
  108.         Microsoft wins, we will be forced to use MS Internet Explorer on
  109.         a Windows platform :(
  110.  
  111.      ``Lynx''
  112.         Lynx is the one of the smallest web browsers.  It is the king of
  113.         text based browsers.  It's free and the source code is available
  114.         under the GNU public license.  It's text based, but it has many
  115.         special features.
  116.  
  117.      Kfm
  118.         Kfm is part of the K Desktop Environment (KDE).  KDE is a system
  119.         that runs on top of X-windows.  It gives you many features like
  120.         drag an drop, sounds, a trashcan and a unified look and feel.
  121.         Kfm is the K File Manager, but it is also a web browser.  Don't
  122.         be fooled by the name, for a young product it is very usable as
  123.         a web browser.  It already supports frames, tables, ftp
  124.         downloads, looking into tar files, and more.  The current
  125.         version of Kfm is 1.39, and it's free.  Kfm can be used without
  126.         KDE, but you still need the librarys that come with KDE.  For
  127.         more information about KDE and Kfm visit the KDE website at
  128.         <http://www.kde.org>.
  129.  
  130.      ``Emacs''
  131.         Emacs is the one program that does everything.  It is a word
  132.         processor, news reader, mail reader, and web browser.  It has a
  133.         steep learning curve at first, because you have to learn what
  134.         all the keys do.  The X-windows version is easier to use,
  135.         because most of the functions are on menus.  Another drawback is
  136.         that it's mostly text based. (It can display graphics if you are
  137.         running it under X-windows).  It is also free, and the source
  138.         code is available under the GNU public license.
  139.  
  140.      NCSA Mosaic
  141.         Mosaic is an X-windows browser developed by the National Center
  142.         for Supercomputing Applications (NCSA) at the University of
  143.         Illinois.  NCSA spent four years on the project and has now
  144.         moved on to other things.  The latest version is 2.6 which was
  145.         released on July 7, 1995.  Source code is available for non-
  146.         commercial use.  Spyglass Inc. <http://www.spyglass.com> has the
  147.         commercial rights to Mosaic.  Its a solid X-windows browser, but
  148.         it lacks the new HTML features.  For more info visit the NCSA
  149.         Mosaic home page at
  150.         <http://www.ncsa.uiuc.edu/SDG/Software/Mosaic/>.  The software
  151.         can be downloaded from
  152.         <ftp://ftp.ncsa.uiuc.edu/Mosaic/Unix/binaries/2.6/Mosaic-
  153.         linux-2.6.Z>.
  154.  
  155.      Arena
  156.         Arena was a X-windows concept browser for the W3C (World Wide
  157.         Web Consortium) when they were testing HTML 3.0.  Hence it
  158.         supports all the HTML 3.0 standards such as style sheets and
  159.         tables.  Development was taken over by Yggdrasil Computing, with
  160.         the idea to turn it into a full fledge free X-windows browser.
  161.         However development has stopped in Feb 1997 with version 0.3.11.
  162.         Only part of the HTML 3.2 standard has been implemented.  The
  163.         source code is released under the GNU public licence.  For more
  164.         information see the web site at
  165.         <http://www.yggdrasil.com/Products/Arena/>.  It can be
  166.         downloaded from <ftp://ftp.yggdrasil.com/pub/dist/web/arena/>.
  167.  
  168.      Amaya
  169.         Amaya is the X-windows concept browser for the W3C for HTML 3.2.
  170.         Therefore it supports all the HTML 3.2 standards.  It also
  171.         supports some of the features of HTML 4.0.  It supports tables,
  172.         forms, client side image maps, put publishing, gifs, jpegs, and
  173.         png graphics.  It is both a browser and authoring tool.  The
  174.         latest public release is 1.0 beta.  Version 1.1 beta is in
  175.         internal testing and is due out soon.  For more information
  176.         visit the Amaya web site at  <http://www.w3.org/Amaya/>.  It can
  177.         be downloaded from <ftp://ftp.w3.org/pub/Amaya-LINUX-
  178.         ELF-1.0b.tar.gz>.
  179.  
  180.      Red Baron
  181.         Red Baron is an X-windows browser made by Red Hat Software.  It
  182.         is bundled with The Official Red Hat Linux distribution.  I
  183.         could not find much information on it, but I know it supports
  184.         frames, forms and SSL.  If you use Red Baron, please help me
  185.         fill in this section.  For more information visit the Red Hat
  186.         website at <http://www.redhat.com>
  187.  
  188.      Chimera
  189.         Chimera is a basic X-windows browser.  It supports some of the
  190.         features of HTML 3.2.  The latest release is 2.0 alpha 6
  191.         released August 27, 1997.  For more information visit the
  192.         Chimera website at <http://www.unlv.edu/chimera/>.  Chimera can
  193.         be downloaded from <ftp://ftp.cs.unlv.edu/pub/chimera-
  194.         alpha/chimera-2.0a6.tar.gz>.
  195.  
  196.      Qweb
  197.         Qweb is yet another basic X-windows browser.  It supports
  198.         tables, forms, and server site image maps.  The latest version
  199.         is 1.3.  For more information visit the Qweb website at
  200.         <http://sunsite.auc.dk/qweb/> The source is available from
  201.         <http://sunsite.auc.dk/qweb/qweb-1.3.tar.gz> The binaries are
  202.         available in a Red Hat RPM from
  203.         <http://sunsite.auc.dk/qweb/qweb-1.3-1.i386.rpm>
  204.  
  205.      Grail
  206.         Grail is an X-windows browser developed by the Corporation for
  207.         National Research Initiatives (CNRI).  Grail is written entirely
  208.         in Python, a interpreted object-oriented language.  The latest
  209.         version is 0.3 released on May 7, 1997.  It supports forms,
  210.         bookmarks, history, frames, tables, and many HTML 3.2 things.
  211.  
  212.      Internet Explorer
  213.         There are rumors, that Microsoft is going to port the Internet
  214.         Explorer to various Unix platforms - maybe Linux.  If its true
  215.         they are taking their time doing it.  If you know something more
  216.         reliable, please drop me an e-mail.
  217.  
  218.   In my humble opinion most of the above software is unusable for
  219.   serious web browsing.  I'm not trying to discredit the authors, I know
  220.   they worked very hard on these projects.  Just think, if all of these
  221.   people had worked together on one project, maybe we would have a free
  222.   browser that would rival Netscape and Internet Explorer.
  223.  
  224.   In my opinion out of all of the broswers, Netscape and Lynx are the
  225.   best.  The runners up would be Kfm, Emacs-W3 and Mosaic.
  226.  
  227.   3.  Lynx
  228.  
  229.   Lynx is one of the smaller (around 600 K executable) and faster web
  230.   browsers available. It does not eat up much bandwidth nor system
  231.   resources as it only deals with text displays.  It can display on any
  232.   console, terminal or xterm. You will not need an  X Windows system or
  233.   additional system memory to run this little browser.
  234.  
  235.   3.1.  Where to get
  236.  
  237.   Both the Red Hat and Slackware distributions have Lynx in them.
  238.   Therefore I will not bore you with the details of compiling and
  239.   installing Lynx.
  240.  
  241.   The latest version is 2.7.1 and can be retrieved from
  242.   <http://www.slcc.edu/lynx/fote/> or from almost any friendly Linux FTP
  243.   server like ftp://sunsite.unc.edu under /pub/Linux/apps/www/broswers/
  244.   or mirror site.
  245.  
  246.   For more information on Lynx try these locations:
  247.  
  248.      Lynx Links
  249.         <http://www.crl.com/~subir/lynx.html>
  250.  
  251.      Lynx Pages
  252.         <http://lynx.browser.org>
  253.  
  254.      Lynx Help Pages
  255.         <http://www.crl.com/~subir/lynx/lynx_help/lynx_help_main.html>
  256.         (the same pages you get from lynx --help and typing ? in lynx)
  257.  
  258.   Note: The Lynx help pages have recently moved.  If you have an older
  259.   version of Lynx, you will need to change your lynx.cfg (in /usr/lib)
  260.   to point to the new address(above).
  261.  
  262.   I think the most special feature of Lynx against all other web
  263.   browsers is the capability for batch mode retrieval. One can write a
  264.   shell script which retrieves a document, file or anything like that
  265.   via http, FTP, gopher, WAIS, NNTP or file:// - url's and save it to
  266.   disk.  Furthermore, one can fill in data into HTML forms in batch mode
  267.   by simply redirecting the standard input and using the -post_data
  268.   option.
  269.  
  270.   For more special features of Lynx just look at the help files and the
  271.   man pages.  If you use a special feature of Lynx that you would like
  272.   to see added to this document, let me know.
  273.  
  274.   4.  Emacs-W3
  275.  
  276.   There are several different flavors of Emacs.  The two most popular
  277.   are GNU Emacs and XEmacs.  GNU Emacs is put out by the Free Software
  278.   Foundation, and is the original Emacs.  It is mainly geared toward
  279.   text based terminals, but it does run in X-Windows.  XEmacs (formerly
  280.   Lucid Emacs) is a version that only runs on X-Windows.  It has many
  281.   special features that are X-Windows related (better menus etc).
  282.  
  283.   4.1.  Where to get
  284.  
  285.   Both the Red Hat and Slackware distributions include GNU Emacs.
  286.  
  287.   The most recent GNU emacs is 19.34.  It doesn't seem to have a web
  288.   site.  The FTP site is at  <ftp://ftp.gnu.ai.mit.edu/pub/gnu/>.
  289.  
  290.   The latest version of XEmacs is 20.2.  The XEmacs FTP site is at
  291.   <ftp://ftp.xemacs.org/pub/xemacs>.  For more information about XEmacs
  292.   goto see its web page at <http://www.xemacs.org>.
  293.  
  294.   Both are available from the Linux archives at ftp://sunsite.unc.edu
  295.   under /pub/Linux/apps/editors/emacs/
  296.  
  297.   If you got GNU Emacs or XEmacs installed, you probably got the W3
  298.   browser running to.
  299.  
  300.   The Emacs W3 mode is a nearly fully featured web browser system
  301.   written in the Emacs Lisp system. It mostly deals with text, but can
  302.   display graphics, too - at least - if you run the emacs under the X
  303.   Window system.
  304.  
  305.   To get XEmacs in to W3 mode, goto the apps menu and select browse the
  306.   web.
  307.  
  308.   I don't use Emacs, so if someone will explain how to get it into the
  309.   W3 mode I'll add it to this document.  Most of this information was
  310.   from the original author.  If any information is incorrect, please let
  311.   me know.  Also let me know if you think anything else should be added
  312.   about Emacs.
  313.  
  314.   5.  Netscape Navigator/Communicator
  315.  
  316.   5.1.  Different versions and options.
  317.  
  318.   Netscape Navigator is the King of WWW browsers.  Netscape Navigator
  319.   can do almost everything. But on the other hand, it is one of the most
  320.   memory hungry and resource eating program I've ever seen.
  321.  
  322.   There are 3 different versions of the program:
  323.  
  324.   Netscape Navigator includes the web browser, netcaster (push client)
  325.   and a basic mail program.
  326.  
  327.   Netscape Communicator includes the web browser, a web editor, an
  328.   advanced mail program, a news reader, netcaster (push client), and a
  329.   group conference utility.
  330.  
  331.   Netscape Communicator Pro includes everything Communicator has plus a
  332.   group calendar, IBM terminal emulation, and remote administration
  333.   features (administrators can update thousands of copies of Netscape
  334.   from their desk).
  335.  
  336.   In addition to the three versions there are two other options you must
  337.   pick.
  338.  
  339.   The first is full install or base install.  The full install includes
  340.   everything.  The base install includes enough to get you started.  You
  341.   can download the additional components as you need them (such as
  342.   multimedia support and netcaster).  These components can be installed
  343.   by the Netscape smart update utility (after installing goto
  344.   help->software updates).  At this time the full install is not
  345.   available for Linux.
  346.  
  347.   The second option is import or export.  If you are from the US are
  348.   Canada you have the option of selecting the import version.  This
  349.   gives you the stronger 128 bit encryption for secure transactions
  350.   (SSL).  The export version only has 40 bit encryption, and is the only
  351.   version allowed outside the US and Canada.
  352.  
  353.   The latest version of the Netscape Navigator/Communicator/Communicator
  354.   Pro is 4.03.  There are two different versions for Linux.  One is for
  355.   the old 1.2 series kernels and one for the new 2.0 kernels.  If you
  356.   don't have a 2.0 kernel I suggest you upgrade; there are many
  357.   improvements in the new kernel.
  358.  
  359.   Beta versions are also available.  If you try a beta version, they
  360.   usually expire in a month or so!
  361.  
  362.   5.2.  Where to get
  363.  
  364.   The best way to get Netscape software is to go through their web site
  365.   at <http://www.netscape.com/download/>.  They have menu's to guide you
  366.   through the selection.  When it ask for the Linux version, it is
  367.   referring to the kernel (most people should be using 2.0 by now).  If
  368.   your not sure which version kernel you have run 'cat /proc/version'.
  369.   Going through the web site is the only way to get the import versions.
  370.  
  371.   If you want an export version you can download them directly from the
  372.   Netscape FTP servers.  The FTP servers are also more up to date. For
  373.   example when I first wrote this the web interface did not have the
  374.   non-beta 4.03 for Linux yet, but it was on the FTP site.  Here are the
  375.   links to the export Linux 2.0 versions:
  376.  
  377.   Netscape Navigator 4.03 is at
  378.   <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/navigator_standalone/navigator-
  379.   v403-export.x86-unknown-linux2.0.tar.gz>
  380.  
  381.   Netscape Communicator 4.03 for Linux 2.0 (kernel) is at
  382.   <ftp://ftp.netscape.com/pub/communicator/4.03/shipping/english/unix/linux20/base_install/communicator-
  383.   v403-export.x86-unknown-linux2.0.tar.gz>
  384.  
  385.   Communicator Pro 4.03 for Linux was not available at the time I wrote
  386.   this.
  387.  
  388.   These url's will change as new versions come out.  If these links
  389.   break you can find them by fishing around at the FTP site
  390.   <ftp://ftp.netscape.com/pub/communicator/>.
  391.  
  392.   These servers are heavily loaded at times.  Its best to wait for off
  393.   peak hours or select a mirror site.  Be prepared to wait, these
  394.   archives are large.  Navigator is almost 8megs, and Communicator base
  395.   install is 10megs.
  396.  
  397.   5.3.  Installing
  398.  
  399.   This section explains how to install version 4 of Netscape Navigator,
  400.   Communicator, and Communicator Pro.
  401.  
  402.   First unpack the archive to a temporary directory.  Then run the ns-
  403.   install script (type ./ns-install).  Then make a symbolic link from
  404.   the /usr/local/netscape/netscape binary to /usr/local/bin/netscape
  405.   (type ln -s /usr/local/netscape/netscape /usr/local/bin/netscape).
  406.   Finally set the system wide environment variable $MOZILLA_HOME to
  407.   /usr/local/netscape so Netscape can find its files.  If you are using
  408.   bash for your shell edit your /etc/profile and add the lines:
  409.  
  410.        MOZILLA_HOME="/usr/local/netscape"
  411.        export MOZILLA_HOME
  412.  
  413.   After you have it installed the software can automatically update
  414.   itself with smart update.  Just run Netscape as root and goto
  415.   help->software updates.  If you only got the base install, you can
  416.   also install the Netscape components from there.
  417.  
  418.   Note: This will not remove any old versions of Netscape, you must
  419.   manually remove them by deleting the Netscape binary and Java class
  420.   file (for version 3).
  421.  
  422.   6.  Setting up WWW server systems
  423.  
  424.   This section contains information on different http server software
  425.   packages and additional server side tools like script languages for
  426.   CGI programs etc.  There are several dozen web servers, I only covered
  427.   those that are fully functional.  As some of these are commercial
  428.   products, I have no way of trying them.  Most of the information in
  429.   the overview section was pieced together from various web sites.  If
  430.   there is any incorrect or missing information please let me know.
  431.  
  432.   For a technical description on the http mechanism, take a look at the
  433.   RFC documents mentioned in the chapter "For further reading" of this
  434.   HOWTO.
  435.  
  436.   I prefer to use the Apache server.  It has almost all the features you
  437.   would ever need and its free!  I will admit that this section is
  438.   heavily biased toward Apache.  I decided to concentrate my efforts on
  439.   the Apache section rather than spread it out over all the web servers.
  440.   I may cover other web servers in the future.
  441.  
  442.   6.1.  Overview
  443.  
  444.      Cern httpd
  445.         This was the first web server.  It was developed by the European
  446.         Laboratory for Particle Physics (CERN).  CERN httpd is no longer
  447.         supported.  The CERN httpd server is reported to have some ugly
  448.         bugs, to be quite slow and resource hungry.  The latest version
  449.         is 3.0.  For more information visit the CERN httpd home page at
  450.         <http://www.w3.org/Daemon/Status.html>.  It is available for
  451.         download at
  452.         <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/httpd-3.0.term.tpz>
  453.         (no it is not a typo, the extension is actually .tpz on the
  454.         site; probably should be .tgz)
  455.  
  456.      NCSA HTTPd
  457.         The NCSA HTTPd server is the father to Apache (The development
  458.         split into two different servers).   Therefore the setup files
  459.         are very similar.  NCSA HTTPd is free and the source code is
  460.         available.  This server not covered in this document, although
  461.         reading the Apache section may give you some help.  The NCSA
  462.         server was once popular, but most people are replacing it with
  463.         Apache.  Apache is a drop in replacement for the NCSA
  464.         server(same configuration files), and it fixes several
  465.         shortcomings of the NCSA server.  NCSA HTTPd accounts for 4.9%
  466.         (and falling) of all web servers. (source September 1997
  467.         Netcraft survey <http://www.netcraft.com/survey/>).  The latest
  468.         version is 1.5.2a.  For more information see the NCSA website at
  469.         <http://hoohoo.ncsa.uiuc.edu>.
  470.  
  471.      ``Apache''
  472.         Apache is the king of all web servers.  Apache and its source
  473.         code is free.  Apache is modular, therefore it is easy to add
  474.         features.  Apache is very flexible and has many, many features.
  475.         Apache and its derivatives makes up 44% of all web domains (50%
  476.         if you count all the derivatives).  There are over 695,000
  477.         Apache servers in operation (source November 1997 Netcraft
  478.         survey <http://www.netcraft.com/survey/>).
  479.  
  480.         The official Apache is missing SSL, but there are two
  481.         derivatives that fill the gap.  Stronghold is a commercial
  482.         product that is based on Apache.  It retails for $995; an
  483.         economy version is available for $495 (based on an old version
  484.         of Apache).  Stronghold is the number two secure server behind
  485.         Netscape (source C2 net <http://www.c2.net/products/stronghold>
  486.         and Netcraft survey <http://www.netcraft.com/survey/>).  For
  487.         more information visit the Stronghold website at
  488.         <http://www.c2.net/products/stronghold/>.  It was developed
  489.         outside the US, so it is available with 128 bit SSL everywhere.
  490.  
  491.         Apache-SSL is a free implementation of SSL, but it is not for
  492.         commercial use in the US (RSA has US patents on SSL technology).
  493.         It can be used for non-commercial use in the US if you link with
  494.         the free RSAREF library.  For more information see the website
  495.         at <http://www.algroup.co.uk/Apache-SSL/>.
  496.  
  497.      Netscape Fast Track Server
  498.         Fast Track was developed by Netscape, but the Linux version is
  499.         put out by Caldera.  The Caldera site lists it as Fast Track for
  500.         OpenLinux.  I'm not sure if it only runs on Caldera OpenLinux or
  501.         if any Linux distribution will do (E-mail me if you have the
  502.         answer).  Netscape servers account for 11.5% (and falling) of
  503.         all web servers (source September 1997
  504.         <http://www.netcraft.com/survey/>).  The server sells for $295.
  505.         It is also included with the Caldera OpenLinux Standard
  506.         distribution which sells for $399 ($199.50 educational).  The
  507.         web pages tell of a nice administration interface and a quick 10
  508.         minute setup.  The server has support for 40-bit SSL.  To get
  509.         the full 128-bit SSL you need Netscape Enterprise Server.
  510.         Unfortunately that is not available for Linux :( The latest
  511.         version available for Linux is 2.0 (Version 3 is in beta, but
  512.         its not available for Linux yet).  To buy a copy goto the
  513.         Caldera web site at
  514.         <http://www.caldera.com/products/netscape/netscape.html> For
  515.         more information goto the Fast Track page at
  516.         <http://www.netscape.com/comprod/server_central/product/fast_track/>
  517.  
  518.      WN WN has many features that make it attractive.  First it is
  519.         smaller than the CERN, NCSA HTTPd, an Apache servers.  It also
  520.         has many built-in features that would require CGI's.  For
  521.         example site searches, enhanced server side includes.  It can
  522.         also decompress/compress files on the fly with its filter
  523.         feature.  It also has the ability to retrieve only part of a
  524.         file with its ranges feature.  It is released under the GNU
  525.         public license.  The current version is 1.18.3. For more
  526.         information see the WN website at <http://hopf.math.nwu.edu/>.
  527.  
  528.      AOLserver
  529.         AOLserver is made by America Online.  I'll admit that I was
  530.         surprised by the features of a web server coming from AOL.  In
  531.         addition to the standard features it supports database
  532.         connectivity.  Pages can query a database by Structured Query
  533.         Language (SQL) commands.  The database is access through Open
  534.         Database Connectivity (ODBC).  It also has built-in search
  535.         engine and TCL scripting.  If that is not enough you can add
  536.         your own modules through the c Application Programming Interface
  537.         (API).  I almost forgot to mention support for 40 bit SSL.  And
  538.         you get all this for free!  For more information visit the
  539.         AOLserver site at <http://www.aolserver.com/server/>
  540.  
  541.      Zeus Server
  542.         Zeus Server was developed by Zeus Technology.  They claim that
  543.         they are the fastest web server (using WebSpec96 benchmark).
  544.         The server can be configured and controlled from a web browser!
  545.         It can limit processor and memory resources for CGI's, and it
  546.         executes them in a secure environment (whatever that means).  It
  547.         also supports unlimited virtual servers.  It sells for $999 for
  548.         the standard version.  If you want the secure server (SSL) the
  549.         price jumps to $1699.  They are based outside the US so 128 bit
  550.         SSL is available everywhere.  For more information visit the
  551.         Zeus Technology website at <http://www.zeus.co.uk>.  The US
  552.         website is at <http://www.zeus.com>.  I'll warn you they are
  553.         cocky about the fastest web server thing.  But they don't even
  554.         show up under top web servers in the Netcraft Surveys.
  555.  
  556.      CL-HTTP
  557.         CL-HTTP stands for Common Lisp Hypermedia Server.  If you are a
  558.         Lisp programmer this server is for you.  You can write your CGI
  559.         scripts in Lisp.  It has a web based setup function.  It also
  560.         supports all the standard server features.  CL-HTTP is free and
  561.         the source code is available.  For more information visit the
  562.         CL-HTTP website at <http://www.ai.mit.edu/projects/iiip/doc/cl-
  563.         http/home-page.html> (could they make that url any longer?).
  564.  
  565.   If you have a commercial purpose (company web site, or ISP), I would
  566.   strongly recommend that you use Apache.  If you are looking for easy
  567.   setup at the expense of advanced features then the Zeus Server wins
  568.   hands down.  I've also heard that the Netscape Server is easy to
  569.   setup.  If you have an internal use you can be a bit more flexible.
  570.   But unless one of them has a feature that you just have to use, I
  571.   would still recommend using one of the three above.
  572.  
  573.   This is only a partial listing of all the servers available.  For a
  574.   more complete list visit Netcraft at
  575.   <http://www.netcraft.com/survey/servers.html> or Web Compare at
  576.   <http://webcompare.internet.com>.
  577.  
  578.   7.  Apache
  579.  
  580.   The current version of Apache is 1.2.4.  Version 1.3 is in beta
  581.   testing.  The main Apache site is at <http://www.apache.org/>.
  582.   Another good source of information is Apacheweek at
  583.   <http://www.apacheweek.com/>.  The Apache documentation is ok, so I'm
  584.   not going to go into detail in setting up apache.  The documentation
  585.   is on the website and is included with the source (in HTML format).
  586.   There are also text files included with the source, but the HTML
  587.   version is better.  The documentation should get a whole lot better
  588.   once the Apache Documentation Project gets under way.  Right now most
  589.   of the documents are written by the developers.  Not to discredit the
  590.   developers, but they are a little hard to understand if you don't know
  591.   the terminology.
  592.  
  593.   7.1.  Where to get
  594.  
  595.   Apache is included in the Red Hat, Slackware, and OpenLinux
  596.   distributions.  Although they may not be the latest version, they are
  597.   very reliable binaries.  The bad news is you will have to live with
  598.   their directory choices (which are totally different from each other
  599.   and the Apache defaults).
  600.  
  601.   The source is available from the Apache web site at
  602.   <http://www.apache.org/dist/> Binaries are are also available at
  603.   apache at the same place.  You can also get binaries from sunsite at
  604.   <ftp://sunsite.unc.edu/pub/Linux/apps/www/servers/>.  And for those of
  605.   us running Red Hat the latest binary RPM file can usually be found in
  606.   the contrib directory at <ftp://ftp.redhat.com/pub/contrib/i386/>
  607.  
  608.   If your server is going to be used for commercial purposes, it is
  609.   highly recommended that you get the source from the Apache website and
  610.   compile it yourself.  The other option is to use a binary that comes
  611.   with a major distribution.  For example Slackware, Red Hat, or
  612.   OpenLinux distributions.  The main reason for this is security.  An
  613.   unknown binary could have a back door for hackers, or an unstable
  614.   patch that could crash your system. This also gives you more control
  615.   over what modules are compiled in, and allows you to set the default
  616.   directories.  It's not that difficult to compile Apache, and besides
  617.   you not a real Linux user until you compile your own programs ;)
  618.  
  619.   7.2.  Compiling and Installing
  620.  
  621.   First untar the archive to a temporary directory.  Next change to the
  622.   src directory.  Then edit the Configuration file if you want to
  623.   include any special modules.  The most commonly used modules are
  624.   already included.  There is no need to change the rules or makefile
  625.   stuff for Linux.  Next run the Configure shell script (./Configure).
  626.   Make sure it says Linux platform and gcc as the compiler.  Next you
  627.   may want to edit the httpd.h file to change the default directories.
  628.   The server home (where the config files are kept) default is
  629.   /usr/local/etc/httpd/, but you may want to change it to just
  630.   /etc/httpd/.  And the server root (where the HTML pages are served
  631.   from) default is /usr/local/etc/httpd/htdocs/, but I like the
  632.   directory /home/httpd/html (the Red Hat default for Apache).  If you
  633.   are going to be using su-exec (see special features below) you may
  634.   want to change that directory too.  The server root can also be
  635.   changed from the config files too.  But it is also good to compile it
  636.   in, just encase Apache can't find or read the config file.  Everything
  637.   else should be changed from the config files.  Finally run make to
  638.   compile Apache.
  639.  
  640.   If you run in to problems with include files missing, check the
  641.   following things. Make sure you have the kernel headers (include
  642.   files) installed for your kernel version. Also make sure you have
  643.   these symbolic links in place:
  644.  
  645.   /usr/include/linux should be a link to /usr/src/linux/include/linux
  646.   /usr/include/asm should be a link to /usr/src/linux/include/asm
  647.   /usr/src/linux should be a link to the Linux source directory (ex.linux-2.0.30)
  648.  
  649.   Links can be made with ln -s, it works just like the cp command except
  650.   it makes a link (ln -s source-dir destination-link)
  651.  
  652.   When make is finished there should be an executable named httpd in the
  653.   directory.  This needs to be moved in to a bin directory.  /usr/sbin
  654.   or /usr/local/sbin would be good choices.
  655.  
  656.   Copy the conf, logs, and icons sub-directories from the source to the
  657.   server home directory.  Next rename 3 of the files files in the conf
  658.   sub-directory to get rid of the -dist extension (ex. httpd.conf-dist
  659.   becomes httpd.conf)
  660.  
  661.   There are also several support programs that are included with Apache.
  662.   They are in the support directory and must be compiled and installed
  663.   separately.  Most of them can be make by using the makefile in that
  664.   directory (which is made when you run the main Configure script).  You
  665.   don't need any of them to run Apache, but some of them make the
  666.   administrators job easier.
  667.  
  668.   7.3.  Configuring
  669.  
  670.   Now you should have four files in your conf sub-directory (under your
  671.   server home directory).  The httpd.conf sets up the server daemon
  672.   (port number, user, etc).  The srm.conf sets the root document tree,
  673.   special handlers, etc.  The access.conf sets the base case for access.
  674.   Finally mime.types tells the server what mime type to send to the
  675.   browser for each extension.
  676.  
  677.   The configuration files are pretty much self-documented (plenty of
  678.   comments), as long as you understand the lingo.  You should read
  679.   through them thoroughly before putting your server to work.  Each
  680.   configuration item is covered in the Apache documentation.
  681.  
  682.   The mime.types file is not really a configuration file.  It is used by
  683.   the server to translate file extensions into mime-types to send to the
  684.   browser.  Most of the common mime-types are already in the file.  Most
  685.   people should not need to edit this file.  As time goes on, more mime
  686.   types will be added to support new programs.  The best thing to do is
  687.   get a new mime-types file (and maybe a new version of the server) at
  688.   that time.
  689.  
  690.   Always remember when you change the configuration files you need to
  691.   restart Apache or send it the SIGHUP signal with kill for the changes
  692.   to take effect.  Make sure you send the signal to the parent process
  693.   and not any of the child processes.  The parent usually has the lowest
  694.   process id number.  The process id of the parent is also in the
  695.   httpd.pid file in the log directory.  If you accidently send it to one
  696.   of the child processes the child will die and the parent will restart
  697.   it.
  698.  
  699.   I will not be walking you through the steps of configuring Apache.
  700.   Instead I will deal with specific issues, choices to be made, and
  701.   special features.
  702.  
  703.   I highly recommend that all users read through the security tips in
  704.   the Apache documentation.  It is also available from the Apache
  705.   website at <http://www.apache.org/docs/mics/security_tips.html>.
  706.  
  707.   7.4.  Hosting virtual websites
  708.  
  709.   Virtual Hosting is when one computer has more than one domain name.
  710.   The old way was to have each virtual host have its own IP address.
  711.   The new way uses only one IP address, but it doesn't work correctly
  712.   with browsers that don't support HTTP 1.1.
  713.  
  714.   My recommendation for businesses is to go with the IP based virtual
  715.   hosting until most people have browsers that support HTTP 1.1 (give it
  716.   a year or two).   This also gives you a more complete illusion of
  717.   virtual hosting.  While both methods can give you virtual mail
  718.   capabilities (can someone confirm this?), only IP based virtual
  719.   hosting can also give you virtual FTP as well.
  720.  
  721.   If it is for a club or personal page, you may want to consider shared
  722.   IP virtual hosting.  It should be cheaper than IP based hosting and
  723.   you will be saving precious IP addresses.
  724.  
  725.   You can also mix and match IP and shared IP virtual hosts on the same
  726.   server.  For more information on virtual hosting visit Apacheweek at
  727.   <http://www.apacheweek.com/features/vhost>.
  728.  
  729.   7.4.1.  IP based virtual hosting
  730.  
  731.   In this method each virtual host has its own IP address.  By
  732.   determining the IP address that the request was sent to, Apache and
  733.   other programs can tell what domain to serve.  This is an incredible
  734.   waste of IP space.  Take for example the servers where my virtual
  735.   domain is kept.  They have over 35,000 virtual accounts, that means
  736.   35,000 IP addresses.  Yet I believe at last count they had less than
  737.   50 servers running.
  738.  
  739.   Setting this up is a two part process.  The first is getting Linux
  740.   setup to accept more than one IP address.  The second is setting up
  741.   apache to serve the virtual hosts.
  742.  
  743.   The first step in setting up Linux to accept multiple IP addresses is
  744.   to make a new kernel.  This works best with a 2.0 series kernel (or
  745.   higher).  You need to include IP networking and IP aliasing support.
  746.   If you need help with compiling the kernel see the kernel howto
  747.   <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>.
  748.  
  749.   Next you need to setup each interface at boot.  If you are using the
  750.   Red Hat Distribution then this can be done from the control panel.
  751.   Start X-windows as root, you should see a control panel.  Then double
  752.   click on network configuration.  Next goto the interfaces panel and
  753.   select your network card.  Then click alias at the bottom of the
  754.   screen.  Fill in the information and click done.  This will need to be
  755.   done for each virtual host/IP address.
  756.  
  757.   If you are using other distributions you may have to do it manually.
  758.   You can just put the commands in the rc.local file in /etc/rc.d
  759.   (really they should go in with the networking stuff).  You need to
  760.   have a ifconfig and route command for each device.  The aliased
  761.   addresses are given a sub device of the main one.  For example eth0
  762.   would have aliases eth0:0, eth0:1, eth0:2, etc.  Here is an example of
  763.   configuring a aliased device:
  764.  
  765.        ifconfig eth0:0 192.168.1.57
  766.        route add -host 192.168.1.57 dev eth0:0
  767.  
  768.   You can also add a broadcast address and a netmask to the ifconfig
  769.   command.  If you have alot of aliases you may want to make a for loop
  770.   to make it easier.  For more information see the IP alias mini howto
  771.   <http://sunsite.unc.edu/LDP/HOWTO/mini/IP-Alias.html>.
  772.  
  773.   Then you need to setup your domain name server (DNS) to serve these
  774.   new domains.   And if you don't already own the domain names, you need
  775.   to contact the Internic <http://www.internic.net> to register the
  776.   domain names.  See the DNS-howto for information on setting up your
  777.   DNS.
  778.  
  779.   Finally you need to setup Apache to server the virtual domain
  780.   correctly.  This is in the httpd.conf configuration file near the end.
  781.   They give you an example to go by.  All commands specific to that
  782.   virtual host are put in between the virtualhost directive tags.  You
  783.   can put almost any command in there.  Usually you set up a different
  784.   document root, script directory, and log files. You can have almost
  785.   unlimited number of virtual hosts by adding more virtualhost directive
  786.   tags.
  787.  
  788.   In rare cases you may need to run separate servers if a directive is
  789.   needed for a virtual host, but is not allowed in the virtual host
  790.   tags.  This is done using the bindaddress directive.   Each server
  791.   will have a different name and setup files.  Each server only responds
  792.   to one IP address, specified by the bindaddress directive.  This is an
  793.   incredible waste of system resources.
  794.  
  795.   7.4.2.  Shared IP virtual hosting
  796.  
  797.   This is a new way to do virtual hosting.  It uses a single IP address,
  798.   thus conserving IP addresses for real machines (not virtual ones).  In
  799.   the same example used above those 30,000 virtual hosts would only take
  800.   50 IP addresses (one for each machine).  This is done by using the new
  801.   HTTP 1.1 protocol.  The browser tells the server which site it wants
  802.   when it sends the request.  The problem is browsers that don't support
  803.   HTTP 1.1 will get the servers main page, which could be setup to
  804.   provide a menu of virtual hosts available.  That ruins the whole
  805.   illusion of virtual hosting.  The illusion that you have your own
  806.   server.
  807.  
  808.   The setup is much simpler than the IP based virtual hosting.  You
  809.   still need to get your domain from the Internic and setup your DNS.
  810.   This time the DNS points to the same IP address as the original
  811.   domain.  Then Apache is setup the same as before.  Since you are using
  812.   the same IP address in the virtualhost tags, it knows you want Shared
  813.   IP virtual hosting.
  814.  
  815.   There are several work arounds for older browsers.  I'll explain the
  816.   best one.  First you need to make your main pages a virtual host
  817.   (either IP based or shared IP).  This frees up the main page for a
  818.   link list to all your virtual hosts.  Next you need to make a back
  819.   door for the old browsers to get in.  This is done using the
  820.   ServerPath directive for each virtual host inside the virtualhost
  821.   directive.  For example by adding ServerPath /mysite/ to
  822.   www.mysite.com old browsers would be able to access the site by
  823.   www.mysite.com/mysite/.  Then you put the default page on the main
  824.   server that politely tells them to get a new browser, and lists links
  825.   to all the back doors of all the sites you host on that machine.  When
  826.   an old browser accesses the site they will be sent to the main page,
  827.   and get a link to the correct page.  New browsers will never see the
  828.   main page and will go directly to the virtual hosts.  You must
  829.   remember to keep all of your links relative within the web sites,
  830.   because the pages will be accessed from two different URL's
  831.   (www.mysite.com and www.mysite.com/mysite/).
  832.  
  833.   I hope I didn't lose you there, but its not an easy workaround.  Maybe
  834.   you should consider IP based hosting after all.  A very similar
  835.   workaround is also explained on the apache website at
  836.   <http://www.apache.org/manual/host.html>.
  837.  
  838.   If anyone has a great resource for Shared IP hosting, I would like to
  839.   know about it.  It would be nice to know what percent of browsers out
  840.   there support HTTP 1.1, and to have a list of which browsers and
  841.   versions support HTTP 1.1.
  842.  
  843.   7.5.  CGI scripts
  844.  
  845.   There are two different ways to give your users CGI script capability.
  846.   The first is make everything ending in .cgi a CGI script.  The second
  847.   is to make script directories (usually named cgi-bin).  You could also
  848.   use both methods.  For either method to work the scripts must be world
  849.   executable (chmod 711).  By giving your users script access you are
  850.   creating a big security risk.  Be sure to do your homework to minimize
  851.   the security risk.
  852.  
  853.   I prefer the first method, especially for complex scripting.  It
  854.   allows you to put scripts in any directory.  I like to put my scripts
  855.   with the web pages they work with.  For sites with allot of scripts it
  856.   looks much better than having a directory full of scripts.  This is
  857.   simple to setup.  First uncomment the .cgi handler at the end of the
  858.   srm.conf file.  Then make sure all your directories have the option
  859.   ExecCGI or All in the access.conf file.
  860.  
  861.   Making script directories is considered more secure.  To make a script
  862.   directory you use the ScriptAlias directive in the srm.conf file.  The
  863.   first argument is the Alias the second is the actual directory.  For
  864.   example ScriptAlias /cgi-bin/ /usr/httpd/cgi-bin/ would make
  865.   /usr/httpd/cgi-bin able to execute scripts.  That directory would be
  866.   used whenever someone asked for the directory /cgi-bin/.  For security
  867.   reasons you should also change the properties of the directory to
  868.   Options none, AllowOveride none in the access.conf (just uncomment the
  869.   example that is there).  Also do not make your script directories
  870.   subdirectories of your web page directories.  For example if you are
  871.   serving pages from /home/httpd/html/, don't make the script directory
  872.   /home/httpd/html/cgi-bin; Instead make it /home/httpd/cgi-bin.
  873.  
  874.   If you want your users to have there own script directories you can
  875.   use multiple ScriptAlias commands.  Virtual hosts should have there
  876.   ScriptAlias command inside the virtualhost directive tags.  Does
  877.   anyone know a simple way to allow all users to have a cgi-bin
  878.   directory without individual ScriptAlias commands?
  879.  
  880.   7.6.  Users Web Directories
  881.  
  882.   There are two different ways to handle user web directories.  The
  883.   first is to have a subdirectory under the users home directory
  884.   (usually public_html).  The second is to have an entirely different
  885.   directory tree for web directories.  With both methods make sure set
  886.   the access options for these directories in the access.conf file.
  887.  
  888.   The first method is already setup in apache by default.  Whenever a
  889.   request for /~bob/ comes in it looks for the public_html directory in
  890.   bob's home directory.  You can change the directory with the UserDir
  891.   directive in the srm.conf file.  This directory must be world readable
  892.   and executable.  This method creates a security risk because for
  893.   Apache to access the directory the users home directory must be world
  894.   executable.
  895.  
  896.   The second method is easy to setup.  You just need to change the
  897.   UserDir directive in the srm.conf file.  It has many different
  898.   formats; you may want to consult the Apache documentation for
  899.   clarification.  If you want each user to have their own directory
  900.   under /home/httpd/, you would use UserDir /home/httpd.  Then when the
  901.   request /~bob/ comes in it would translate to /home/httpd/bob/.  Or if
  902.   you want to have a subdirectory under bob's directory you would use
  903.   UserDir /home/httpd/*/html.  This would translate to
  904.   /home/httpd/bob/html/ and would allow you to have a script directory
  905.   too (for example /home/httpd/bob/cgi-bin/).
  906.  
  907.   7.7.  Daemon mode vs. Inetd mode
  908.  
  909.   There are two ways that apache can be run.  One is as a daemon that is
  910.   always running (Apache calls this standalone).  The second is from the
  911.   inetd super-server.
  912.  
  913.   Daemon mode is far superior to inetd mode.  Apache is setup for daemon
  914.   mode by default.  The only reason to use the inetd mode is for very
  915.   low use applications.  Such as internal testing of scripts, small
  916.   company Intranet, etc.  Inetd mode will save memory because apache
  917.   will be loaded as needed.   Only the inetd daemon will remain in
  918.   memory.
  919.  
  920.   If you don't use apache that often you may just want to keep it in
  921.   daemon mode and just start it when you need it.  Then you can kill it
  922.   when you are done (be sure to kill the parent and not one of the child
  923.   processes).
  924.  
  925.   To setup inetd mode you need to edit a few files.  First in
  926.   /etc/services see if http is already in there.  If its not then add
  927.   it:
  928.  
  929.        http    80/tcp
  930.  
  931.   Right after 79 (finger) would be a good place.  Then you need to edit
  932.   the /etc/inetd.conf file and add the line for Apache:
  933.  
  934.        http    stream  tcp     nowait  root    /usr/sbin/httpd httpd
  935.  
  936.   Be sure to change the path if you have Apache in a different location.
  937.   And the second httpd is not a typo; the inet daemon requires that.  If
  938.   you are not currently using the inet daemon, you may want to comment
  939.   out the rest of the lines in the file so you don't activate other ser¡
  940.   vices as well (FTP, finger, telnet, and many other things are usually
  941.   run from this daemon).
  942.  
  943.   If you are already running the inet deamon (inetd), then you only need
  944.   to send it the SIGHUP signal (via kill; see kill's man page for more
  945.   info) or reboot the computer for changes to take effect.  If you are
  946.   not running inetd then you can start it manually.  You should also add
  947.   it to your init files so it is loaded at boot (the rc.local file may
  948.   be a good choice).
  949.  
  950.   7.8.  Allowing put and delete commands
  951.  
  952.   The newer web publishing tools support this new method of uploading
  953.   web pages by http (instead of FTP).  Some of these products don't even
  954.   support FTP anymore!  Apache does support this, but it is lacking a
  955.   script to handle the requests.  This script could be a big security
  956.   hole, be sure you know what you are doing before attempting to write
  957.   or install one.
  958.  
  959.   If anyone knows of a script that works let me know and I'll include
  960.   the address to it here.
  961.  
  962.   For more information goto Apacheweek's article at
  963.   <http://www.apacheweek.com/features/put>.
  964.  
  965.   7.9.  User Authentication/Access Control
  966.  
  967.   This is one of my favorite features.  It allows you to password
  968.   protect a directory or a file without using CGI scripts.  It also
  969.   allows you to deny or grant access based on the IP address or domain
  970.   name of the client.  That is a great feature for keeping jerks out of
  971.   your message boards and guest books (you get the IP or domain name
  972.   from the log files).
  973.  
  974.   To allow user authentication the directory must have AllowOverrides
  975.   AuthConfig set in the access.conf file.  To allow access control (by
  976.   domain or IP address) AllowOverrides Limit must be set for that
  977.   directory.
  978.  
  979.   Setting up the directory involves putting an .htaccess file in the
  980.   directory.  For user authentication it is usually used with an
  981.   .htpasswd and optionally a .htgroup file.  Those files can be shared
  982.   among multiple .htaccess files if you wish.
  983.  
  984.   For security reasons I recommend that everyone use these directives in
  985.   there access.conf file:
  986.  
  987.        <files ~ "/\.ht">
  988.        order deny,allow
  989.        deny from all
  990.        </files>
  991.  
  992.   If you are not the administrator of the system you can also put it in
  993.   your This directive will prevent people from looking into your access
  994.   control files (.htaccess, .htpasswd, etc).
  995.  
  996.   There are many different options and file types that can be used with
  997.   access control.  Therefore it is beyond the scope of this document to
  998.   describe the files.  For information on how to setup User
  999.   Authentication see the Apacheweek feature at
  1000.   <http://www.apacheweek.com/features/userauth> or the NCSA pages at
  1001.   <http://hoohoo.ncsa.uiuc.edu/docs-1.5/tutorials/user.html>.
  1002.  
  1003.   7.10.  su-exec
  1004.  
  1005.   The su-exec feature runs CGI scripts as the user of the owner.
  1006.   Normally it is run as the user of the web server (usually nobody).
  1007.   This allows users to access there own files in CGI scripts without
  1008.   making them world writable (a security hole).  But if you are not
  1009.   careful you can create a bigger security hole by using the su-exec
  1010.   code.  The su-exec code does security checks before executing the
  1011.   scripts, but if you set it up wrong you will have a security hole.
  1012.  
  1013.   The su-exec code is not for amateurs.  Don't use it if you don't know
  1014.   what you are doing.  You could end up with a gaping security hole
  1015.   where your users can gain root access to your system.  Do not modify
  1016.   the code for any reason.  Be sure to read all the documentation
  1017.   carefully.  The su-exec code is hard to setup on purpose, to keep the
  1018.   amateurs out (everything must be done manually, no make file no
  1019.   install scripts).
  1020.  
  1021.   The su-exec code resides in the support directory of the source.
  1022.   First you need to edit the suexec.h file for your system.  Then you
  1023.   need to compile the su-exec code with this command:
  1024.  
  1025.        gcc suexec.c -o suexec
  1026.  
  1027.   Then copy the suexec executable to the proper directory.  The Apache
  1028.   default is /usr/local/etc/httpd/sbin/.  This can be changed by editing
  1029.   httpd.h in the Apache source and recompiling Apache.  Apache will only
  1030.   look in this directory, it will not search the path.  Next the file
  1031.   needs to be changed to user root (chown root suexec) and the suid bit
  1032.   needs to be set (chmod 4711 suexec).  Finally restart Apache, it
  1033.   should display a message on the console that su-exec is being used.
  1034.  
  1035.   CGI scripts should be set world executable like normal.  They will
  1036.   automaticaly be run as the owner of the CGI script.  If you set the
  1037.   SUID (set user id) bit on the CGI scripts they will not run.  If the
  1038.   directory or file is world or group writable the script will not run.
  1039.   Scripts owned by system users will not be run (root, bin, etc.).  For
  1040.   other security conditions that must be met see the su-exec
  1041.   documentation.  If you are having problems see the su-exec log file
  1042.   named cgi.log.
  1043.  
  1044.   Su-exec does not work if you are running Apache from inetd, it only
  1045.   works in daemon mode.  It will be fixed in the next version because
  1046.   there will be no inetd mode.  If you like playing around in source
  1047.   code, you can edit the http_main.c.  You want to get rid of the line
  1048.   where Apache announces that it is using the su-exec wrapper (It
  1049.   wrongly prints this in front of the output of everything).
  1050.  
  1051.   Be sure and read the Apache documentation on su-exec.  It is included
  1052.   with the source and is available on the Apache web site at
  1053.   <http://www.apache.org/docs/suexec.html>
  1054.  
  1055.   7.11.  Imagemaps
  1056.  
  1057.   Apache has the ability to handle server side imagemaps.  Imagemaps are
  1058.   images on webpages that take users to different locations depending on
  1059.   where they click.  To enable imagemaps first make sure the imagemap
  1060.   module is installed (its one of the default modules).  Next you need
  1061.   to uncomment the .map handler at the end of the srm.conf file.  Now
  1062.   all files ending in image to separate links.  Apache uses map files in
  1063.   the standard NCSA format.  Here is an example of using a map file in a
  1064.   web page:
  1065.  
  1066.   <a href="/map/mapfile.map">
  1067.   <img src="picture.gif" ISMAP>
  1068.   </a>
  1069.  
  1070.   In this example mapfile.map is the mapfile, and picture.gif is the
  1071.   image to click on.
  1072.  
  1073.   There are many programs that can generate NCSA compatible map files or
  1074.   you can create them yourself.  For a more detailed discussion of
  1075.   imagemaps and map files see the Apacheweek feature at
  1076.   <http://www.apacheweek.com/features/imagemaps>.
  1077.  
  1078.   7.12.  SSI/XSSI
  1079.  
  1080.   Server Side Includes (SSI) adds dynamic content to otherwise static
  1081.   web pages.  The includes are embedded in the web page as comments.
  1082.   The web server then parses these includes and passes the results to
  1083.   the web server.  SSI can add headers and footers to documents, add
  1084.   date the document was last updated, execute a system command or a CGI
  1085.   script.  With the new eXtended Server Side Includes (XSSI) you can do
  1086.   a whole lot more.  XSSI adds variables and flow control statements
  1087.   (if, else, etc).  Its almost like having an programming language to
  1088.   work with.
  1089.  
  1090.   Parsing all HTML files for SSI commands would waste allot of system
  1091.   resources.  Therefore you need to distinguish normal HTML files from
  1092.   those that contain SSI commands.  This is usually done by changing the
  1093.   extension of the SSI enhanced HTML files.  Usually the .shtml
  1094.   extension is used.
  1095.  
  1096.   To enable SSI/XSSI first make sure that the includes module is
  1097.   installed.  Then edit srm.conf and uncomment the AddType and
  1098.   AddHandler directives for you want to run SSI/XSSI files.  This is
  1099.   done in the access.conf file.  Now all files with the extension .shtml
  1100.   will be parsed for SSI/XSSI commands.
  1101.  
  1102.   Another way of enabling includes is to use the XBitHack directive.  If
  1103.   you turn this on it looks to see if the file is executable by user.
  1104.   If it is and Options Includes is on for that directory, then it is
  1105.   treated as an SSI file.  This only works for files with the mime type
  1106.   text/html (.html .htm files).  This is not the preferred method.
  1107.  
  1108.   There is a security risk in allowing SSI to execute system commands
  1109.   and CGI scripts.  Therefore it is possible to lock that feature out
  1110.   with the Option IncludesNOEXEC instead of Option Includes in the
  1111.   access.conf file.  All the other SSI commands will still work.
  1112.  
  1113.   For more information see the Apache mod_includes documentation that
  1114.   comes with the source.  It is also available on the website at
  1115.   <http://www.apache.org/docs/mod/mod_include.html>.
  1116.  
  1117.   For a more detailed discussion of SSI/XSSI implementation see the
  1118.   Apacheweek feature at  <http://www.apacheweek.com/features/ssi>.
  1119.  
  1120.   For more information on SSI commands see the NCSA documentation at
  1121.   <http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html>.
  1122.  
  1123.   For more information on XSSI commands goto
  1124.   <ftp://pageplus.com/pub/hsf/xssi/xssi-1.1.html>.
  1125.  
  1126.   7.13.  Module system
  1127.  
  1128.   Apache can be extended to support almost anything with modules.  There
  1129.   are allot of modules already in existence.  Only the general interest
  1130.   modules are included with Apache.   For links to existing modules goto
  1131.   the
  1132.  
  1133.   Apache Module Registry at <http://www.zyzzyva.com/module_registry/>.
  1134.  
  1135.   For module programming information goto
  1136.   <http://www.zyzzyva.com/module_registry/reference/>
  1137.  
  1138.   8.  Web Server Add-ons
  1139.  
  1140.   Sorry this section has not been written yet.
  1141.  
  1142.   Coming soon: mSQL, PHP/FI, cgiwrap, Fast-cgi, MS frontpage extentions,
  1143.   and more.
  1144.  
  1145.   9.  FAQ
  1146.  
  1147.   There aren't any frequent asked questions - yet...
  1148.  
  1149.   10.  For further reading
  1150.  
  1151.   10.1.  O'Reilly & Associates Books
  1152.  
  1153.   In my humble opinion O'Reilly & Associates make the best technical
  1154.   books on the planet.  They focus mainly on Internet, Unix and
  1155.   programming related topics. They start off slow with plenty of
  1156.   examples and when you finish the book your an expert.  I think you
  1157.   could get by if you only read half of the book.  They also add some
  1158.   humor to otherwise boring subjects.
  1159.  
  1160.   They have great books on HTML, PERL, CGI Programming, Java,
  1161.   JavaScript, C/C++, Sendmail, Linux and much much more.  And the fast
  1162.   moving topics (like HTML) are updated and revised about every 6 months
  1163.   or so.  So visit the O'Reilly & Associates <http://www.ora.com/> web
  1164.   site or stop by your local book store for more info.
  1165.  
  1166.   And remember if it doesn't say O'Reilly & Associates on the cover,
  1167.   someone else probably wrote it.
  1168.  
  1169.   10.2.  Internet Request For Comments (RFC)
  1170.  
  1171.   ╖  RFC1866 written by T. Berners-Lee and D. Connolly, "Hypertext
  1172.      Markup Language - 2.0", 11/03/1995
  1173.  
  1174.   ╖  RFC1867 writtenm by E. Nebel and L. Masinter, "Form-based File
  1175.      Upload in HTML", 11/07/1995
  1176.   ╖  RFC1942 written by D. Raggett, "HTML Tables", 05/15/1996
  1177.  
  1178.   ╖  RFC1945 by T. Berners-Lee, R. Fielding, H. Nielsen, "Hypertext
  1179.      Transfer Protocol -- HTTP/1.0", 05/17/1996.
  1180.  
  1181.   ╖  RFC1630 by T. Berners-Lee, "Universal Resource Identifiers in WWW:
  1182.      A Unifying Syntax for the Expression of Names and Addresses of
  1183.      Objects on the Network as used in the World-Wide Web", 06/09/1994
  1184.  
  1185.   ╖  RFC1959 by T. Howes, M. Smith, "An LDAP URL Format", 06/19/1996
  1186.  
  1187.