home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
LINUX
/
HOWTO
/
mini
/
httpnetw.txt
< prev
next >
Wrap
Text File
|
1997-07-07
|
13KB
|
356 lines
The Linux Intranet HOWTO
Pramod Karnad, karnadp@mozart.inet.co.th
v1.1, 14 March 1996
This document describes how to convert your Linux machine into a HTTP
server and connect it to a Netware LAN using the Netware Client under
Windows
1. Introduction
This document assumes that you already know how to install TCP/IP on
your Linux server and connect it physicaly to your LAN using an
Ethernet network card. This also assumes you have some basic knowledge
of Netware. The configuration of the Netware server has been shown
using version 3.1x as the basis. You can also use INETCFG to achieve
the same result. On the client side the discussion is with respect to
Windows 3.1x, Windows for Workgroups and Win95.
In all the examples I am assuming that the Linux server has an IP
address of 200.0.0.1 and therefore I am assigning the address of
200.0.0.2 to the Netware server and 200.0.0.3 to the workstation. You
may choose suitable addresses depending on your configuration.
1.1. What is required
You will need the following software before attempting the
installation.
╖ the HTTP server software which can be downloaded from OneStep NCSA
HTTPd Downloader page.
╖ The Novell Netware Client available from Netwire (The TCP/IP files
can be found in the Lan Workplace update LW42T3.exe).
╖ WWW Browsers like Netscape Navigator or NCSA Mosaic
2. Install the HTTP server
When you download the server you have two options: To get the source
and compile it yourself, or get the precompiled binaries. The
precompiled binaries for Linux (ELF) version are available at NCSA but
not the older versions.
2.1. Preparation before downloading
The server at NCSA will guide you through the steps for configuration
options and prepare the various files for you. But before you attempt
to download HTTPd be prepared with answers to the following questions
2.1.1. The Operating System
First, you much choose whether to download the source or a pre-
compiled version of the software. If your particular system doesn't
appear in the menu, then you will have to get the default source, and
compile it yourself.
To check the version of your Linux go to the command prompt on your
Linux machine and type
linux:~$ uname -a
which will respond with a line which looks similar to this
linux:~$ uname -a
Linux linux 1.0.9 #4 Tue Sep 13 04:05:51 CDT 1994 i586
linux:~$
The version of Linux is 1.0.9. (Note: The current versions are ELF and
should look like linux 1.2.13 ELF)
The remaining parameters can be specified before downloading or
configured later by modifying the file srm.conf in the
/usr/local/etc/httpd/conf directory. The names of the actual
directives that appear in the file httpd.conf are shown in brackets.
The only exception is the directive DocumentRoot which appears in the
file srm.conf
2.1.2. Process type (ServerType)
This specifies how your machine will run your HTTPd server. The
preferred method is 'standalone'. This makes the HTTP daemon to be
running constantly. If you choose to load HTTPd under 'inetd', the
server binary will be reloaded into memory for every request, which
may slow your server down.
2.1.3. Binding Port (Port)
This specifies which port of your machine that the HTTPd daemon will
bind to and listen for HTTP requests. If you can login as 'root', use
the default setting of 80. Otherwise choose a setting between 1025
and 65535.
2.1.4. Server user identity (User)
This is the user id the server will change to when answering requests
and acting on files.This question needs to be answered only if you are
running the server as 'standalone'. If you are someone without root
permissions, just use your own login name. If you are system
administrator, you might want to create a special user so you can
control file permissions.
2.1.5. Server group identity (Group)
This is the group id the server will change to when answering requests
and acting on files. This is similar to Server User identity and is
applicable only if you are running the server as standalone.
If you do not have root permissions, just use the name of your primary
group. You can find out your group by typing groups at the Linux
command prompt.
2.1.6. Server administrator email address (ServerAdmin)
This is the email address that the user should send an email message
to when reporting a problem with the server. You can put your personal
e-mail address.
2.1.7. Location of server directory (ServerRoot)
This is where the server resides on your system. If you have root
permissions leave it in its recommended location /usr/local/etc/httpd.
If you cannot login as root, choose a subdirectory in your home path.
You can find out the path of your home directory with the pwd command.
2.1.8. Location of HTML files (DocumentRoot)
This is where the HTML files to be served are located. The default
location is /usr/local/etc/httpd/htdocs. You could however set it to
be the home directory of the special user you chose in Server user
identity, or a subdirectory in your home directory if you can't login
as root.
When in doubt, use the default settings. Now that you have answers to
the above questions you can Download NCSA HTTPd. You should read the
HTTPd Documentation before you attempt installation. If you are
planning to compile the code then you need to modify the makefiles in
each of the three directories support, src, cgi-src. If your version
of Linux is already supporte d then you just have to type make linux
at the top level directory (i.e. /usr/local/etc/httpd)
2.2. Compiling HTTPd
Compiling is simple, just type make linux at the prompt in the server
root directory. Note: Users of pre-ELF Linux have to uncomment
#define NO_PASS in file portability.h and set DBM_LIBS= -ldbm in the
Makefile before compiling HTTPd.
3. Testing HTTPd
After you have installed HTTPd, login as root and start it by typing
httpd & . (assuming you have installed as standalone) You should now
be able to see it in the list generated by ps. The simplest way to
test HTTPd is by Telnet. At the Linux command prompt type
linux:~$ telnet 200.0.0.1 80
where 80 is the default port for HTTP. If you have configured 'Port'
as something different then type that number instead. You should get a
response which looks like this
Trying 200.0.0.1...
Connected to linux.ppg_corp.
Escape character is '^]'.
Now if you type in any character and press Enter you should get a
response similar to the one shown below.
HTTP/1.0 400 Bad Request
Date: Wed, 10 Jan 1996 10:24:37 GMT
Server: NCSA/1.5
Content-type: text/html
<HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
<BODY><H1>400 Bad Request < /H1>
Your client sent a query that this server could
not understand.<P>
Reason: Invalid or unsupported method.<P>
< /BODY>
Now we are ready to connect to this server using another PC and a WWW
Browser.
4. Connecting on a Netware LAN with Windows
In order to setup the Netware server you should have Supervisor
permissions or atleast Console operator permissions. If these cannot
be got, try asking your Network Administrator to help you with the
setup.
In the following examples I am assuming that the Linux server has an
IP address of 200.0.0.1 and therefore I am assigning the address of
200.0.0.2 to the Netware server and 200.0.0.3 to the workstation. You
may choose suitable addresses depending on your configuration.
4.1. Setup the Netware server
At the Server enable the Ethernet_II frame type on the LAN by typing
these commands or include them in the AUTOEXEC.ncf file.
load NE2000 frame=Ethernet_II name=IPNET
load TCPIP
bind IP to IPNET addr=200.0.0.2 mask=FF.FF.FF.0
You might have to specify the slot or board number while loading the
NE2000 driver depending on your machine configuration. (eg: load
NE2000 slot=3