GeneWeb - Server or CGI

When it is launched, "gwd" is a server. Normally, the third address:
"http://computer:2317/base" is the one to use for external people.

<p>

Nevertheless, this applies only to computers visible from outside, i.e.
only the ones directly connected to Internet.

<p>

If you use a provider, your computer is not visible. In this case,
there is no solution. It is the provider's responsibility to install
{GeneWeb}. At the time I am writing these lines (Oct 98), I
think that no provider installed it.

<p>

Thus, the following concerns only the ones who have a direct connection
to Internet.

<p>

If you are under Unix or Windows NT (thus not Windows 95), you had to
enter the computer as a user, giving your login name and your password.
Maybe you want to log out without that {GeneWeb} stops.

<p>

You have then two solutions to resolve this problem: installation in
"service" and installation in "cgi".


==Installation in "service"  ==

In this functioning mode, you do not need that a Web server be installed
in your computer. Gwd <em>is</em> a Web server itself. Its only difference
with other servers is that it serves only genealogy.

<ul><li> If you are under Unix, instead of typing just "gwd", type:

<pre>
     nohup gwd 2&gt;&amp;1 &amp             (under "sh", "ksh", "bash")
     nohup gwd &gt;&amp; nohup.out &amp;     (under "csh", "tcsh")
</pre>

Then you can logout. Gwd will go on running and send its trace to
the file "nohup.out" you can consult later. To stop it, look at its
process number, with the command "ps" and kill it with the command
"kill".

</ul>

<p>

<ul><li> If you are under Windows NT, you must install "gwd" as "service" by use of
the utility "srvany.exe", logged in as Administrator. From Windows NT Ressource Kit 
you need: srvany.exe, instsrv.exe, may be srvinstw.exe and delsrv.exe, too. 
First, copy srvany.exe to a folder on your computer (e. g. C:\GeneWeb) and install
 it as a service (nicer tool for that is the graphical utility srvinstw.exe):
<PRE>      instsrv GeneWebServer c:\GeneWeb\srvany.exe
</PRE>
In Services in Control Panel, click GeneWebServer, and then click Startup to choose 
Automatic or Manual. In the Log On As box, choose the account to start the service in,
and fill in the right password (this must be used to have access to the network).
{GeneWeb} will be started by specifying the following
registry keys with regedt32:
<PRE>
1. under HKLM\System\CurrentControlSet\Services\GeneWebServer create
   a new key "Parameters"
   
2. create there two new Values (type REG_SZ) Application and AppDirectory, e. g.
   Application: REG_SZ: C:\GeneWeb\gw\gwd.exe
   AppDirectory: REG_SZ: C:\GeneWeb\gw
</PRE>
Now you can control the GeneWeb service in Control Panel -> Services -> GeneWebServer
"Startup"/"Stop" or by typing "net start GeneWebServer" or "net stop GeneWebServer"
at the command prompt. To remove GeneWebServer, stop it and type "delsrv GeneWebServer"
or "instsrv GeneWebServer remove".
</ul>


==Installation in "cgi"  ==

In this functioning mode, a Web server must be running on your
computer. "Cgi"s are programs that the Web server can launch. Only
the system administrator is authorized to add "cgi"s. You must ask
him/her beforehand.

<p>

<ul><li>

Under Unix, if you installed {GeneWeb} e.g. in the directory
"/home/smith/geneweb", create a file you name "geneweb" and holding the
following lines:

<pre>
     #!/bin/sh
     DIR=/home/smith/geneweb/gw
     cd $DIR
     $DIR/gwd -cgi 2&gt;/dev/null
</pre>

Let this shell executable (chmod +x geneweb) and ask your system
administrator to install this file in the "cgi" directory. Ask him/her
what address to use. This probably will be something like:

<pre>
     http://blabla.xx.edu/cgi-bin/geneweb
</pre>

<p>

If you open the above URL address in you navigator, you will see a page
asking only "Base:". Enter the name of your database. You can also
add "?b=jones" to this URL, if "jones" is your database's name.

<p>

Remarks:

<ul>

<li> If this latest command does not work, it is possible that the Web
server have no access rights to the base and the other directories.
Do the following operations:

<pre>
     cd /home/smith/geneweb/gw
     chmod 777 . lang images base.gwb
</pre>

<li> If it answers but is very slow, it is possible that it is because
the base is accessed by NFS (Network File System). It would be better
that it be not the case: if possible, copy the directory geneweb on a
local disk of the Web server.  If it is not possible, add the option
"-nolock" in the call to the command "gwd" of the file "geneweb"
above:

<pre>
     $DIR/gwd -cgi -nolock
</pre>

</ul>

</ul>

<ul><li>

Under Windows NT, if you installed {GeneWeb} e.g. in the directory
"c:\home\smith\geneweb", create a file you name "gwd.arg" and holding
the following lines:

<pre>
     -hd
     c:\home\smith\geneweb\gw
     -bd
     c:\home\smith\geneweb\gw
     -cgi
</pre>

<p>

These are the options which can be given to the command "gwd". Do
"gwd -help" to see all the possible options.

<p>

Ask your system administrator then:

<ul>

<li> To install "gwd.arg" in the "cgi" directory.

<li> To copy the file "gwd.exe" of the "geneweb" directory to
this "cgi" directory.

</ul>

<p>

Ask him/her the address to use. This will be probably something like:

<pre>
     http://blabla.xx.edu/cgi-bin/gwd.exe
</pre>

<p>

If you open the above URL address in you navigator, you will see a page
asking only "Base:". Enter the name of your database. You can also
add "?b=jones" to this URL, if "jones" is your database's name.

<p>

Remark: if this latest command does not work, it is possible that the
Web server have no access rights to the base and the other
directories.  You have to give the read and write access rights to the
directory "geneweb", its subdirectory "gw" and the subdirectories
"lang", "jones.gwb", "images" (and "cnt" if this directory exists).

</ul>


==Installation in "service" or in "cgi"?  ==

If you have the choice of installing it in "service" or in "cgi",
please note the following points:

<ul>

<li> In "cgi" mode, the requests are indirect, since they have to pass
through the Web server, which can slow down the treatment.

<li> Under Unix, the installation in "service" is easier, since it
does not require the permission nor the intervention of the system
administrator.

<li> Under Windows NT, you always have to ask your system
administrator, who will probably prefer the "cgi" mode which is much
easier to install and more controllable.

<li> Of course, if there is no Web server in your computer, only the
installation in "service" is possible.

</ul>

<p>

<br>
<center>Return to [[[diruse/Directions for Use]]]</center>

