home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LINUX / HOWTO / mini / httpnetw.txt < prev    next >
Text File  |  1997-07-07  |  13KB  |  356 lines

  1.   The Linux Intranet HOWTO
  2.   Pramod Karnad, karnadp@mozart.inet.co.th
  3.   v1.1, 14 March 1996
  4.  
  5.   This document describes how to convert your Linux machine into a HTTP
  6.   server and connect it to a Netware LAN using the Netware Client under
  7.   Windows
  8.  
  9.   1.  Introduction
  10.  
  11.   This document assumes that you already know how to install TCP/IP on
  12.   your Linux server and connect it physicaly to your LAN using an
  13.   Ethernet network card. This also assumes you have some basic knowledge
  14.   of Netware. The configuration of the Netware server has been shown
  15.   using version 3.1x as the basis. You can also use INETCFG to achieve
  16.   the same result. On the client side the discussion is with respect to
  17.   Windows 3.1x, Windows for Workgroups and Win95.
  18.  
  19.   In all the examples I am assuming that the Linux server has an IP
  20.   address of 200.0.0.1 and therefore I am assigning the address of
  21.   200.0.0.2 to the Netware server and 200.0.0.3 to the workstation. You
  22.   may choose suitable addresses depending on your configuration.
  23.  
  24.   1.1.  What is required
  25.  
  26.   You will need the following software before attempting the
  27.   installation.
  28.  
  29.   ╖  the HTTP server software which can be downloaded from OneStep NCSA
  30.      HTTPd Downloader page.
  31.  
  32.   ╖  The Novell Netware Client available from Netwire (The TCP/IP files
  33.      can be found in the Lan Workplace update LW42T3.exe).
  34.  
  35.   ╖  WWW Browsers like Netscape Navigator or NCSA Mosaic
  36.  
  37.   2.  Install the HTTP server
  38.  
  39.   When you download the server you have two options: To get the source
  40.   and compile it yourself, or get the precompiled binaries. The
  41.   precompiled binaries for Linux (ELF) version are available at NCSA but
  42.   not the older versions.
  43.  
  44.   2.1.  Preparation before downloading
  45.  
  46.   The server at NCSA will guide you through the steps for configuration
  47.   options and prepare the various files for you. But before you attempt
  48.   to download HTTPd be prepared with answers to the following questions
  49.  
  50.   2.1.1.  The Operating System
  51.  
  52.   First, you much choose whether to download the source or a pre-
  53.   compiled version of the software. If your particular system doesn't
  54.   appear in the menu, then you will have to get the default source, and
  55.   compile it yourself.
  56.  
  57.   To check the version of your Linux go to the command prompt on your
  58.   Linux machine and type
  59.  
  60.          linux:~$  uname -a
  61.  
  62.   which will respond with a line which looks similar to this
  63.  
  64.           linux:~$  uname -a
  65.           Linux linux 1.0.9 #4 Tue Sep 13 04:05:51 CDT 1994 i586
  66.           linux:~$
  67.  
  68.   The version of Linux is 1.0.9. (Note: The current versions are ELF and
  69.   should look like linux 1.2.13 ELF)
  70.  
  71.   The remaining parameters can be specified before downloading or
  72.   configured later by modifying the file srm.conf in the
  73.   /usr/local/etc/httpd/conf directory. The names of the actual
  74.   directives that appear in the file httpd.conf are shown in brackets.
  75.   The only exception is the directive DocumentRoot which appears in the
  76.   file srm.conf
  77.  
  78.   2.1.2.  Process type (ServerType)
  79.  
  80.   This specifies how your machine will run your HTTPd server. The
  81.   preferred method is 'standalone'. This makes the HTTP daemon to be
  82.   running constantly. If you choose to load HTTPd under 'inetd', the
  83.   server binary will be reloaded into memory for every request, which
  84.   may slow your server down.
  85.  
  86.   2.1.3.  Binding Port (Port)
  87.  
  88.   This specifies which port of your machine that the HTTPd daemon will
  89.   bind to and listen for HTTP requests. If you can login as 'root', use
  90.   the default setting of 80.  Otherwise choose a setting between 1025
  91.   and 65535.
  92.  
  93.   2.1.4.  Server user identity (User)
  94.  
  95.   This is the user id the server will change to when answering requests
  96.   and acting on files.This question needs to be answered only if you are
  97.   running the server as 'standalone'.  If you are someone without root
  98.   permissions, just use your own login name. If you are system
  99.   administrator, you might want to create a special user so you can
  100.   control file permissions.
  101.  
  102.   2.1.5.  Server group identity (Group)
  103.  
  104.   This is the group id the server will change to when answering requests
  105.   and acting on files. This is similar to Server User identity and is
  106.   applicable only if you are running the server as standalone.
  107.  
  108.   If you do not have root permissions, just use the name of your primary
  109.   group. You can find out your group by typing groups at the Linux
  110.   command prompt.
  111.  
  112.   2.1.6.  Server administrator email address (ServerAdmin)
  113.  
  114.   This is the email address that the user should send an email message
  115.   to when reporting a problem with the server. You can put your personal
  116.   e-mail address.
  117.  
  118.   2.1.7.  Location of server directory (ServerRoot)
  119.  
  120.   This is where the server resides on your system. If you have root
  121.   permissions leave it in its recommended location /usr/local/etc/httpd.
  122.   If you cannot login as root, choose a subdirectory in your home path.
  123.   You can find out the path of your home directory with the pwd command.
  124.  
  125.   2.1.8.  Location of HTML files (DocumentRoot)
  126.  
  127.   This is where the HTML files to be served are located. The default
  128.   location is /usr/local/etc/httpd/htdocs.  You could however set it to
  129.   be the home directory of the special user you chose in Server user
  130.   identity, or a subdirectory in your home directory if you can't login
  131.   as root.
  132.  
  133.   When in doubt, use the default settings. Now that you have answers to
  134.   the above questions you can Download NCSA HTTPd.  You should read the
  135.   HTTPd Documentation before you attempt installation. If you are
  136.   planning to compile the code then you need to modify the makefiles in
  137.   each of the three directories support, src, cgi-src. If your version
  138.   of Linux is already supporte d then you just have to type make linux
  139.   at the top level directory (i.e. /usr/local/etc/httpd)
  140.  
  141.   2.2.  Compiling HTTPd
  142.  
  143.   Compiling is simple, just type make linux at the prompt in the server
  144.   root directory.  Note: Users of pre-ELF Linux have to uncomment
  145.   #define NO_PASS in file portability.h and set DBM_LIBS= -ldbm in the
  146.   Makefile before compiling HTTPd.
  147.  
  148.   3.  Testing HTTPd
  149.  
  150.   After you have installed HTTPd, login as root and start it by typing
  151.   httpd & . (assuming you have installed as standalone) You should now
  152.   be able to see it in the list generated by ps. The simplest way to
  153.   test HTTPd is by Telnet. At the Linux command prompt type
  154.  
  155.           linux:~$  telnet 200.0.0.1 80
  156.  
  157.   where 80 is the default port for HTTP. If you have configured 'Port'
  158.   as something different then type that number instead. You should get a
  159.   response which looks like this
  160.  
  161.           Trying 200.0.0.1...
  162.           Connected to linux.ppg_corp.
  163.           Escape character is '^]'.
  164.  
  165.   Now if you type in any character and press Enter you should get a
  166.   response similar to the one shown below.
  167.  
  168.      HTTP/1.0 400 Bad Request
  169.      Date: Wed, 10 Jan 1996 10:24:37 GMT
  170.      Server: NCSA/1.5
  171.      Content-type: text/html
  172.  
  173.      <HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
  174.      <BODY><H1>400 Bad Request < /H1>
  175.      Your client sent a query that this server could
  176.      not understand.<P>
  177.      Reason: Invalid or unsupported method.<P>
  178.      < /BODY>
  179.  
  180.   Now we are ready to connect to this server using another PC and a WWW
  181.   Browser.
  182.  
  183.   4.  Connecting on a Netware LAN with Windows
  184.  
  185.   In order to setup the Netware server you should have Supervisor
  186.   permissions or atleast Console operator permissions. If these cannot
  187.   be got, try asking your Network Administrator to help you with the
  188.   setup.
  189.  
  190.   In the following examples I am assuming that the Linux server has an
  191.   IP address of 200.0.0.1 and therefore I am assigning the address of
  192.   200.0.0.2 to the Netware server and 200.0.0.3 to the workstation. You
  193.   may choose suitable addresses depending on your configuration.
  194.  
  195.   4.1.  Setup the Netware server
  196.  
  197.   At the Server enable the Ethernet_II frame type on the LAN by typing
  198.   these commands or include them in the AUTOEXEC.ncf file.
  199.  
  200.           load NE2000 frame=Ethernet_II name=IPNET
  201.           load TCPIP
  202.           bind IP to IPNET addr=200.0.0.2 mask=FF.FF.FF.0
  203.  
  204.   You might have to specify the slot or board number while loading the
  205.   NE2000 driver depending on your machine configuration. (eg: load
  206.   NE2000 slot=3