Hi Robert

> No, I maybe do not understand how all the stuff works together  
> (Apache, Websh, CGI). The hosting company said that if it worked on  
> FreeBSD they would make it available to everyone. I guess that means  
> "out of the box" or something. It would be strictly CGI and they  
> offer Tcl 8.4 for CGI stuff.

I asked a friend to give it a try on FreeBSD. He has an outdated
version (he says), but it still works pretty much out-of-the-box (if
you consider running configure with options and a CPPFLAGS variable
out of the box :-)

Here's what he did:

"I have particular packages (using the FreeBSD packages/ports
 mechanism) of tcl (84), autoconf (259) and apache (21) installed."

crusoe(jason): fetch 
ftp://mirror.switch.ch/mirror/apache/dist/tcl/websh/source/websh-3.6.0b4-src.tar.gz
[...]
crusoe(jason): tar -xzvf websh-3.6.0b4-src.tar.gz
[...]
crusoe(jason): cd websh-3.6.0b4/src/unix
crusoe(jason): autoconf259
[...]
crusoe(jason): CPPFLAGS=-I/usr/local/include/apr-1 ./configure 
--with-tclinclude=/usr/local/include/tcl8.4 --with-tcl=/usr/local/lib/tcl8.4 
--with-httpdinclude=/usr/local/include/apache21
[...]
crusoe(jason): gmake
[...]
crusoe(jason): uname -a
FreeBSD crusoe.XXXX.XXX 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Mon Sep 19 11:11:30 
CEST 2005 [EMAIL PROTECTED]:/usr/src/sys/i386/compile/CRUSOE  i386
crusoe(jason): ./websh3.6.0b4
% web::put "hello, world"
Content-Type: text/html
Generator: websh 3.6.0b4

hello, world


> How does it get setup as a CGI?

As you see above, gmake not only creates mod_websh.so, but also a
websh binary. This is all you need for CGI (except for the underlying
Tcl installation).

Just start writing your CGI scripts with #!/path/to/websh or better
the common Tcl shell wrapper hack that allows to set the environmnt
correctly if needed:

 #!/bin/sh
 # \
 exec path/to/websh "$0" "$@"

 web::put "Hello CGI Websh"

hth
Ronnie
--
Ronnie Brunner | [EMAIL PROTECTED]
phone +41 (0)44 247 79 79 | fax +41 (0)44 247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to