# Configureing Ruby cgi http.conf

**URL:** <https://www.ruby-forum.com/t/configureing-ruby-cgi-http-conf/102263>\
**Category:** Ruby\
**Created:** [August 14, 2006, 4:56am UTC](https://www.ruby-forum.com/t/configureing-ruby-cgi-http-conf/102263 "2006-08-14T04:56:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbelsham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a88e4f/32.png) [@dbelsham](https://www.ruby-forum.com/u/dbelsham)\
**Post date:** [August 14, 2006, 4:56am UTC](https://www.ruby-forum.com/t/configureing-ruby-cgi-http-conf/102263/1 "2006-08-14T04:56:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dbelsham](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a88e4f/32.png) [@dbelsham](https://www.ruby-forum.com/u/dbelsham)\
**Post date:** [August 15, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/configureing-ruby-cgi-http-conf/102263/2 "2006-08-15T14:19:30Z")

</div>

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
