Configureing Ruby cgi http.conf

Hi

I know that this is a simple problem but.

can some one tel me how to configure the httpd.conf to use simple ruby
cgi scripts. I have seen it before but cannot find it now.

Installed the latest Ruby.
have craeted a simple hello world script put it in the cgi bin and when
I link to it it askes me if I want to save it or open it

so far I have added to httpd but I don’t think that it is enough?

AddType application/x-httpd-ruby .rb
Action application/x-httpd-ruby /usr/local/bin/ruby

Derek

Derek Belsham wrote:

so far I have added to httpd but I don’t think that it is enough?

AddType application/x-httpd-ruby .rb
Action application/x-httpd-ruby /usr/local/bin/ruby

You may need to tell Apache to execute the file as CGI

I have this in http.conf

AddHandler cgi-script .rb

And this is various virtual host conf files

<Directory /some/app/dir>
Options +ExecCGI

Or something like that.


James B.

“Discover the recipes you are using and abandon them.”

  • Brian Eno and Peter Schmidt, Oblique Strategies

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs