Consultor Eletrônico



Kbase 16044: WebSpeed 1.0 - Tips for Using the NCSA Web Server on UNIX
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/21/2000
SUMMARY:

This Knowledge Base Solution provides some basics of the NCSA Web Server on UNIX -- Note: The NCSA HTTPd is no longer under development and is an unsupported product.

EXPLANATION:

You must first set up the Web Server to run and accept requests on the UNIX system. There are several steps involved in this setup, and if
one is missed, it can, and will cause problems down the line.

1) ServerRoot

The ServerRoot is an NCSA specific term that refers to the
directory where the NCSA Web Server is installed. This
term is defined in the httpd.conf in the conf directory
where the NCSA is installed.

2) httpd

The httpd is the Web Server daemon process. The letters
stand for "hyper text transfer protocol daemon". There may
be several of these processes running on the system. The
minimum number of httpd processes per system is determined
by the StartServers parameter in the httpd.conf file
located in the {ServerRoot}/conf directory. The maximum
number is determined by the MaxServers parameter in that file.

On Sun Solaris and AIX:
Check to see whether the daemon process(es) is(are) running.

ps -ef | grep httpd

Check the port status.

netstat -a | grep {port #}
Note: The {port #} is the number specified by the
Port parameter in the httpd.conf file.

3) How to customize the configuration files in the
{ServerRoot}/conf directory:

It is very important that all of the necessary changes have
been made to the configuration files on the
{ServerRoot}/conf directory. If any piece of the Web
Server is not configured properly, it will not work properly.

Without going into specifics, it is important that each
configuration file contain all updates to such elements as
the directory where the NCSA is installed, the machine
name, and a service name that actually exists in the
/etc/services file or the yp services file. If you want
several instances running on the system, it is a good idea
to add additional ports to the /etc/services file or the yp
services file.

Be sure to note that there are several configuration files
in the ../conf directory, and you need to verify that the
information is correct in each file.

Make sure you shut down and restart the Web server if you
make any changes to any of the configuration files.

4) Test the static HTML page

You can quickly check that the server is running and
accepting client requests by placing a sample HTML file in
the {DocumentRoot} directory on the Web Server machine.
This is the directory where the Web Server looks for any
HTML documents. It is configured in the srm.conf file.

Make sure the {DocumentRoot} directory has execute
permissions by the owner of the httpd process. The files
in the {DocumentRoot} directory need read permissions by
the owner of the httpd process.

The URL that you need to type into the browser is as follows.

httpd://<machine>:<port#>/mytest.html

5) Test the CGI (Common Gateway Interface) capability. You
can confirm that the Web Server is configured for CGI by
using one of the sample CGI scripts that comes with the
NCSA Web Server. These scripts are located in the
{ScriptAlias} directory. This is where all the CGI scripts
are placed. It is configured in the srm.conf file. There
is an example called test-env that will send a page to the
browser that lists all the configuration information.

Make sure the {ScriptAlias} directory has execute
permissions by the httpd process owner. The files in the
{ScriptAlias} directory also need execute permissions by
the httpd process owner.

The URL that you need to type into the browser is:

httpd://{machine}:{port#}/cgi-bin/test-env


References to Written Documentation:

NCSA README documentation can be found at URL,
http://hoohoo.ncsa.uiuc.edu/docs/