From: Zach Dennis Date: 2003-12-18T10:05:58+09:00 Subject: Re: Ruby as CGI with Apache on Linux[IGNORE THREAD] -----Original Message----- From: Zach Dennis [mailto:zdennis@mktec.com] Sent: Wednesday, December 17, 2003 8:04 PM To: ruby-talk ML Subject: Ruby as CGI with Apache on Linux I feel bad for asking this question, but I am going to pull my hair out with this. I recently got Ruby to run as a cgi under Apache2/Win2k combination. Works great. I am now trying to do the same thing on Apache2/Redhat9 combo, but to no avail. I keep getting the Server Error 500, premature end of script headers. Here is my Apache config: ------------------------------ ServerAdmin root@localhost DocumentRoot "/var/www/html" Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all Order allow,deny Deny from all AllowOverride None Order allow,deny Allow from all ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" AddType application/x-httpd-ruby .rb Action application/x-httpd-ruby /usr/local/bin/ruby Here is my Script that I am trying to run( test.rb ): ----------------------------------------------------- #!/usr/local/bin/ruby print "Content-type: text/html\r\n" print "Hello" I was having this problem on my windows box at first but then I changed the first line to read: #! ruby and it has worked ever since. However I have changed the first line on my test.rb file on the Linux box to the following variations: #! ruby #!/usr/local/bin/ruby #!/bin/ruby #!/bin/env ruby #! /bin/env ruby and to not avail does it work. All files are owned by root. Any ideas? Thanks in advance, Zach