Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Problem with Apache and CGI returning text/plain

From: gscottjones:mchsi at: 9-May-2002 15:17

From: "pat665"
> Hi rebollers, > > I am having problem with the following script. > > 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > #!d:/rebview/rebol.exe --cgi > REBOL [] > print "content-type : text/plain^/^/" > print "Hello CGI-World!! (text)" > 8< - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > The script is short but my problem is a bit longer to explain. This script > is installed on a windows 98 machine where both Apache and Personal Web > Server (PWS) are installed (only one server is active at a time). > > The script is called with the following URL from another windows 98
machine:
> http://192.168.1.51/cgi-bin/cgi-hw-txt.r > > The problem is : > - If Apache is running, I am asked to download the file cgi-hw-txt.r. > - If PWS is running, all is correct and I am getting the display of "Hello > CGI-World!!!(text)"
<rest snipped> Hi, Pat, I've grown a bit rusty in Apache configuration, but be sure to set-up http.conf as follows, then restart apache: 1) scriptalias has been set for the cgi-bin directory. Typically uncomment the following #ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/" to ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/" 2) Be sure cgi-bin has been set to be executable by setting Options to ExecCGI: <Directory "C:/Apache/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> 3) If you wish to have executable .r files outside of cgi-bin, need to add an AddHandler in the AddHandler section as such: AddHandler cgi-script .r This should be considered a security risk, though. Save the httpd.conf file, then restart Apache. Hope this helps. --Scott Jones