Kevin wrote:
>I'm having trouble setting up M2web.  I know nothing
>about cgi, so bear with me please.

CGI stands for Common Gateway Interface. The essence of it is that Apache or 
any web
server supporting CGI can be configured to associate a script file, such as 
m2web.cgi,
with certain URL's and to run the script if file permissions are set 
appropriately.

A CGI script is intended to start up a process that will respond to a single 
web request
and quit. When the CGI process starts up, it will find all of the parameters 
that
determine its context defined in a standard set of environment variables. It 
may have
additional input to be read from its standard input when the type of request is 
POST or
PUT. A CGI process communicates back to the web server and the web client by 
writing to
its standard output.

The m2web.cgi script is intended to start up a MUMPS job running routine 
^htCGI. The CGI
environment variables and other input will be brought into MUMPS variables 
prior to
calling any application specific routines so that most applications can be 
coded to work
simply with data and no device handling. Application programs have many options 
for how to
return a response. The simplest is to set the text to be returned into the 
variable htReturn.

There are many ways to enable CGI.

It might be helpful to review the documentation at 
http://httpd.apache.org/docs/ and specifically at 
http://httpd.apache.org/docs/howto/cgi.html
 and similarly for Apache2
http://httpd.apache.org/docs-2.0/howto/cgi.html

>I think I have just plain Apache.

This is fine but not quite as easy to configure. I prefer Apache2 because the 
setup is
more modular and you don't have to touch the main configuration file to define 
a virtual
host or to enable CGI or SSL, etc. I prefer to define a virtual host for vista 
so you can
take over the top level URI's but leave the default apache configuration 
untouched.

If you don't define a virtual host for vista, I think the best way to run M2Web 
is by
enabling CGI from user directories. This would allow Apache to run the CGI with 
the
identity of the user who owns the script rather than running as the normal 
apache user.


>I found these (apparently older) instructions:
>http://vista.vmth.ucdavis.edu/notebook/index/12.html
>That seem target at plain Apache.

Yes, they are older. You might get some ideas from the descriptive text, but 
most of the
details of the older instructions don't apply to the newer package. Very little 
is
actually required.

You need to define a ScriptAlias for m2web.cgi or place it in a directory, such 
as
cgi-bin, for which a ScriptAlias has been defined.

You need to also define an Alias for /icon/ so that icons included with M2Web 
can be found.

You could use the aliases from the new m2web-vista-site file as examples.

>But these describe a different directory setup.

I know you already have your own configuration of directories. You could put 
the M2Web
files in there if you want. I would keep them in a separate subdirectory to 
facilitate
updates. The essential thing is that Apache must be able to find and execute 
the m2web
script and that script must be able to run GT.M with your routines and globals 
and with
compatible permissions.

>Also, I'm not clear about what linux users I need to
>set up.  It looks in some of the instructions that
>there is a vista user.  Other places I think I saw a
>m2web user.  Are those required.

What users and groups do you want to be able to access your MUMPS globals and 
routines?
Those are the only ones required.

>I know I'm being slow, but if someone could walk me
>through this I'd appreciate it.

Ok, continued in another email response...

Also, I have a newer version of m2web.cgi at
http://vista.vmth.ucdavis.edu/files/w/m2web-vista-cgi
The main difference is at the bottom where it checks for existence of 
environment variable
HTTP_HOST to determine how it will start GT.M. This makes it easy to test the 
correctness
of the GT.M M2Web configuration in direct mode.

>Thanks
>Kevin

---------------------------------------
Jim Self
Systems Architect, Lead Developer
VMTH Computer Services, UC Davis
(http://www.vmth.ucdavis.edu/us/jaself)


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to