CGI configuration help requested
[1/8] from: dlmayer::flashcom::net at: 14-Nov-2000 12:14
Sure would appreciate some help in properly configuring my server so that I can invoke
Rebol scripts from the web.
My web host provider is running BSDI and Apache. I have access to the .htaccess file,
but not the srm.conf file. I have added the following line to the .htaccess file:
AddType application/x-httpd-cgi .r
I have put a test file,test.r, in my cgibin and permissioned it -rwxr-xr-x. For some
reason my cgibin is not hyphenated like cgi-bin, it is just cgibin.
I know Rebol works as I can telnet into my site and run it.
When I point my browser at test.r I get the following error message:
The server encountered an internal error or misconfiguration and was unable to complete
your request.
The following is from my log:
[14/Nov/2000:11:19:24 -0500] "GET /cgibin/test.r HTTP/1.1" 500 529
My test script is:
#!/rebol/rebol --cgi
REBOL []
print{
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions
to HTML 4.0//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<P>It works!</P>
<P>Hurrah!!</P> </BODY>
</HTML>
}
Does anyone see what I need to correct?
Thanks...
Doug Mayer
[2/8] from: sterling:rebol at: 14-Nov-2000 10:31
As wit hall CGI programs, you'll need to print out hte content-type
before you print anything else out. Then there must be an empty line
before any other text... see corrected cgi script quoted below.
Sterling
> Sure would appreciate some help in properly configuring my server so that I can invoke
Rebol scripts from the web.
> My web host provider is running BSDI and Apache. I have access to the .htaccess file,
but not the srm.conf file. I have added the following line to the .htaccess file:
<<quoted lines omitted: 5>>
> The following is from my log:
> [14/Nov/2000:11:19:24 -0500] "GET /cgibin/test.r HTTP/1.1" 500 529
Notice the "content-type: text/html" followed by a newline. If REBOL
is being spawned at the CGI request with this script properly then the
only problem was the incomplete content-type header and it should work
fine. If this doesn't fix it, then you still have some problem.
Check the Apache error.log file to see if it tells you anything
useful.
Corrected script here:
[3/8] from: andyyork:gte at: 14-Oct-2000 13:44
try
#!/rebol/rebol -cs
[4/8] from: dlmayer:flashcom at: 14-Nov-2000 14:35
Thank you Andy York and Sterling for your suggestions. Unfortunately
neither of them corrected the situation. I really believe that the problem
resides with the configurations settings. To get php4 to work tech support
told me to add the following to my .htaccess file:
Action php4-script /cgibin/php4
AddHandler php4-script .php4
AddHandler php4-script .php
After that, php4 worked fine.
I wonder if there are settings like the above that I need to do for Rebol.
I appreciate your continuing help.
... Doug Mayer
----- Original Message -----
From: Douglas Mayer <[dlmayer--flashcom--net]>
To: <[rebol-list--rebol--com]>
Sent: Tuesday, November 14, 2000 12:14 PM
Subject: [REBOL] CGI configuration help requested
Sure would appreciate some help in properly configuring my server so that I
can invoke Rebol scripts from the web.
My web host provider is running BSDI and Apache. I have access to the
.htaccess file, but not the srm.conf file. I have added the following line
to the .htaccess file:
AddType application/x-httpd-cgi .r
I have put a test file,test.r, in my cgibin and permissioned it -rwxr-xr-x.
For some reason my cgibin is not hyphenated like cgi-bin, it is just cgibin.
I know Rebol works as I can telnet into my site and run it.
When I point my browser at test.r I get the following error message:
The server encountered an internal error or misconfiguration and was unable
to complete your request.
The following is from my log:
[14/Nov/2000:11:19:24 -0500] "GET /cgibin/test.r HTTP/1.1" 500 529
My test script is:
#!/rebol/rebol --cgi
REBOL []
print{
<!DOCTYPE HTML PUBLIC "-//SoftQuad Software//DTD HoTMetaL PRO
6.0::19990601::extensions to HTML 4.0//EN" "hmpro6.dtd">
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<P>It works!</P>
<P>Hurrah!!</P> </BODY>
</HTML>
}
Does anyone see what I need to correct?
Thanks...
Doug Mayer
[5/8] from: tim:johnsons-web at: 14-Nov-2000 11:54
Hi Douglas:
When the sysop for my domain installed the rebol
binary (RH 6.0 machine) I do not believe that he
edited apache config files at all....
However, for testing on my machine, I have the following
line:
AddHandler cgi-script .cgi .pl .py .r
Just a simple suggestion for your script:
Try a script with the following:
three lines only: (and of course, edit /usr/bin/ if the rebol binary
is on a different path)
;======================================
#!/usr/bin/rebol -cs
REBOL []
print "Content-Type: text/html^/^/"
;=using the extra carriage return shouldn't hurt.
;=idea is to start with minimum verbosity
Douglas Mayer wrote:
[6/8] from: rebol:svendx:dk at: 15-Nov-2000 0:42
Hello Douglas,
I resently installed FreeBSD on our home server, and had Apache display the exact same
error message.
I found the problem to be that the REBOL binary wasn't executable by 'others', and since
Apache tried to run REBOL as 'nobody' it failed.
For me, the problem disapeared when I gave 'others' 'execute' right to rebol.
Best regards
Thomas Jensen
On 14-Nov-00, you wrote:
> Sure would appreciate some help in properly configuring my server so that I can invoke
Rebol scripts from the web.
> My web host provider is running BSDI and Apache. I have access to the .htaccess file,
but not the srm.conf file. I have added the following line to the .htaccess file:
<<quoted lines omitted: 22>>
> Thanks...
> Doug Mayer
Best regards
Thomas Jensen
[7/8] from: ingo:2b1 at: 14-Nov-2000 23:51
Hi Douglas,
two ideas ...
- are you sure the path is alright? can sometimes be tricky
- try renaming to test.cgi
I hope that helps,
Ingo
Once upon a time Douglas Mayer spoketh thus:
[8/8] from: dlmayer:flashcom at: 14-Nov-2000 23:06
Thank you Ingo Hohmann, Thomas Jensen, Tim Johnson, Sterling, and Andy York
for helping out a newbie. My cgi call is working right now. The problem
was twofold - having the correct print statement (content-type: text/html)
and the path to Rebol.
...Doug
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted