Subject: | |
From: | |
Reply To: | |
Date: | Wed, 18 Nov 1998 17:18:45 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
[log in to unmask] writes:
>
> Donna writes:
>
> >quote Configuring and Managing MPE/iX Internet Services:
> >Only the remsh client functionality has been implemented on the
> >MPE/iX system.
>
> >doesn't look like it :-( - d
Web servers can be made to act as command servers.
> Next, create the file /tmp/doit containing:
>
> #!/bin/sh
> callci "stream jdoit.pub.sys"
To be a minimal web server CGI, before the callci, you need to:
echo "Content-type: text/plain\n"
> Make sure it's executable (with chmod +x /tmp/doit).
Put the script in a web server CGI directory.
> Now, if you "telnet yourmachine.longs.com 3000", the job will be
> launched.
telnet yourmachine.longs.com 80
GET /doit HTTP/1.0
<press RETURN twice>
<doit is executed and the results displayed>
The above telnet example is what a web browser does (simplified) when you type
in the URL:
http://yourmachine.longs.com:80/doit
Plus you'll have all of the security features of the web server available to
control access to the script.
For a more real example, visit this URL:
http://mbloaner.dis.cccd.edu/cgi-bin/showjob
Or:
telnet mbloaner.dis.cccd.edu 80
GET /cgi-bin/showjob HTTP/1.0
<press RETURN twice>
The sh script being executed is:
#!/bin/sh
cat - <<EOF
Content-type: text/html
<HTML>
<HEAD>
<TITLE>:showjob</TITLE>
</HEAD>
<BODY>
<H1>:showjob</H1>
<PRE>
EOF
callci showjob
cat - <<EOF
</PRE>
</BODY>
</HTML>
EOF
You could of course just use text/plain and not generate the HTML wrapping.
--
Mark Bixby E-mail: [log in to unmask]
Coast Community College Dist. Web: http://www.cccd.edu/~markb/
District Information Services 1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)
|
|
|