Hello,

Fortunately, configuring Apache is quit easy on any platform, so here
goes...

You need to check (and edit) your httpd.conf for apache like this:

Look for the line starting with 'ScriptAlias /cgi-bin/', this tells
apache where your cgi-bin will be, i.e. the place where you store and
run your scripts. Change it (you might have to uncomment it) so it reads
like this:

ScriptAlias /cgi-bin/ "location/of/your/htdocs/cgi-bin/"

Don't forget the trailing forward slash, and make it a direct path, for
example, I have "d:/net/cgi-bin/".

Below this line, you'll find:

<Directory "location/cgi-bin">
AllowOverride None
Options None
</Directory>

Again, change it to a direct path, but without the trailing slash! You
can also specify extra options, but these should be fine. You might have
to uncomment that as well, though. My file reads like this:

<Directory "d:/net/cgi-bin">
AllowOverride None
Options None
</Directory>

That should do the trick, but if it isn't working, try to uncomment the
following line:

AddHandler cgi-script .cgi

You shouldn't have to do this, though, because this is only necessary
when you wish to run cgi-scripts outside of your defined /cgi-bin/
directory. Best not do that when you go public with your server! =)

In your case, you probably have all that in order, since Perl does work.
Your Rebol scripts should have this '#!e:\rebol\rebol.exe --cgi', and
you have that, so I think you just need to change one thing, don't give
your scripts a .r extension, but a .cgi extension... That's all!

Hope that helps, good luck!

Rachid

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 18, 2000 00:32
Subject: [REBOL] Windows NT 4.0 / Apache / Rebol Configuration


> I am running Windows NT 4.0 (I believe with SP5) with Rebol/Core
> 2.2.0.3.1 (which is the latest version as far as I can tell) and
> Apache 1.3.9.
>
> My goal is to get Rebol running with Apache and CGI. (I figure I
> should be able to CGI working first before I move on to anything
> more advanced.)
>
> If anyone has an NT 4.0 / Apache / Rebol setup running and can
> provide some help, I would appreciate it!
>
> My script (sample.r) looks like this:
>
>     #!e:\rebol\rebol.exe --cgi
>     REBOL []
>
>     print "Content-Type: text/plain^/"
>     print ["Welcome to my time and date page!"
>            " The time and date is" now]
>
> If I run the program using the command "e:\rebol\rebol.exe
> sample.r", the Rebol console opens and the script output is
> display (good).
>
> If I run the program using the command "e:\rebol\rebol.exe --cgi
> sample.r", the Rebol console doesn't open (good) but there is no
> output to the CMD.EXE console (bad).
>
> Based on one of the e-mails in this list, I tried "e:\rebol
> rebol.exe --cgi sample.r | more". This gives me output to the
> CMD.EXE console (good).
>
> I'm assuming I need to get the "" version working before I have a
> chance of getting Apache CGI working.
>
> I have a second problem...
>
> When I bring up http://server/cgi-bin/sample.r in the browser I
> get an error:
>
>     Internal Server Error
>     The server encountered an internal error or misconfiguration
>     and was unable to complete your request.
>
> The error log says:
>
>     (2)No such file or directory: couldn't spawn child process:
>     e:/program files/apache group/apache/cgi-bin/sample.r
>
> If I cut and paste that pathname to the CMD.EXE window and change
> the forward slashes to back slashes and put quotes around the
> whole thing, I can do a DIR on it and see the file exists.
>
> I have set up the file associations as follows:
>
>     E:\>assoc .r
>     .r=rfile
>     E:\>ftype rfile
>     rfile=e:\rebol\rebol.exe --cgi "%1" %*
>
> If I remove the --cgi from the above command and type "sample.r"
> in the CMD.EXE window, the Rebol script runs in a Rebol window as
> expected. If I put the --cgi back in and type "sample.r" in the
> CMD.EXE window, I get the behavior I mentioned above where the
> output doesn't show up.
>
> Now, it seems from the error log that there is something else
> wrong with my configuration such that, even if I get the script
> output to appear, Apache still won't run the script. I can put
> Perl scripts in the cgi-bin directory and they work in the
> browser.
>
> Thanks for any help!
>
> /jonathan
>
>

Reply via email to