[REBOL] Re: Rebol and Apache on my computer?
From: rebol-list2:seznam:cz at: 25-Nov-2002 12:02
Hello Robert,
Friday, November 22, 2002, 12:29:38 PM, you wrote:
RT> Hello,
RT> I would like to develop some Rebol CGI scripts and test them on my computer.
RT> I already downloaded PHP Triad and installed PHP, Apache, and MySQL on my
RT> computer. All of that works fine for testing PHP scripts.
RT> I want to test Rebol programs on the Apache setup. Does anyone know how to get the
RT> Apache to recognize .r Rebol scripts? I tried modifying the httpd.conf file in C:\apache
RT> by adding:
RT> AddType application/x-httpd-rebol .r
RT> AddHandler cgi-script .r
RT> Action application/x-httpd-rebol /cgi-bin/rebol.exe
RT> but nothing happens. When I open my browser to:
RT> http://localhost/test.r
RT> I just get a server error. I couldn't find anything in the Apache files about setting
RT> permissions, but the PHP scripts did not require them.
RT> Any ideas?
RT> Thank you.
RT> Sincerely,
RT> Robert
Does your script starts like this one?:
#!c:/usr/local/bin/base2600031 -cqs
Rebol []
print "Content-Type: text/plain^/" ;<- this is important!
print "Hello World"
PHP controls the HTTP headers itself so you don't need to do it if you
don't want to. In Rebol you are responsible to send at least the
content type by yourself! There must be 2 newlines before start of the
content.
If you are not using Win, you should also make sure you have correct
linebreaks so this may be good before upload to unix type of servers:
replace/all yourScript CRLF newline
If it's still not working, do you have right permissions on the Rebol
executable and the script as well?
I'm using Rebol on both op. systems with the Apache without problems.
PS: I'm not using the AddHandler and the Action settings in the Apache
config file, because I have no possibility to do it under the Unix
(I'm not an admin)
=( Oliva David )=======================( [oliva--david--seznam--cz] )==
=( Earth/Europe/Czech_Republic/Brno )=============================
=( coords: [lat: 49.22 long: 16.67] )=============================