[REBOL] Re: Having trouble getting my rebol cgi setup
From: gjones05:mail:orion at: 7-Feb-2001 21:52
Rod,
I relooked at all my settings and also what I wrote you. Nothing jumps
right out at me, unless there is some subtle problem with file permissions
in Win2k, of which I am unfamiliar.
I realized that I was less than clear when I talked about restarting Apache.
I should have said to restart it after making changes in the httpd.conf
file. I suspect you knew that that was what I meant.
And, to be sure that I am understanding, is the REBOL script in the cgi-bin
directory? And is that where the Perl script is also? I assumed they were.
The directory where executable scripts reside must have the option "ExecCGI"
set. Typically this is the cgi-bin directory for Apache (scripts in IIS).
This directory can be located most anywhere on your drive, but is best kept
out of the direct www accessible path. The way to do this, and yet have it
appear
to be in the path, is to use ScriptAlias set for the virtual name
and the actual name. The first line which is also commented shows the
default directory if Apache is installed in C:\apache. This line probably
points to the directory where the Perl script lies. As shown below, the
original location can be commented out or changed as follows to point to a
new cgi-bin directory:
#ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
ScriptAlias /cgi-bin/ "C:/path/to/your/website/cgi-bin/"
The following section allows CGI scripts to be executed in the cgi-bin
directory. IN this example, I have commented out the default, and set the
Options to ExecCGI in the new ScriptAlias directory.
#
# "C:/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#<Directory "C:/Apache/cgi-bin">
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
#</Directory>
<Directory "C:/path/to/your/website/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
Save the httpd.conf and start/restart Apache. Check your script. If it
doesn't work, try the following VERY simple script "clock.r" (or "clock.cgi"
if preferred) saved in the cgi-bin directory (which is presumably where the
Perl script resides):
#!c:/apps/rebol/view/rebol -cs
REBOL [Title: "Clock"]
print "Content-Type: text/html^/"
print ["The time is now" now/time]
Good luck and let us know what you find.
--Scott