configureing Ruby cgi http.conf

D

Derek Belsham

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
 
J

James Britt

Derek said:
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

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
</Directory>


Or something like that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,112
Latest member
VinayKumar Nevatia
Top