# Ruby on Fastcgi (Apache)

**URL:** <https://www.ruby-forum.com/t/ruby-on-fastcgi-apache/124538>\
**Category:** Ruby\
**Created:** [December 30, 2007, 12:14am UTC](https://www.ruby-forum.com/t/ruby-on-fastcgi-apache/124538 "2007-12-30T00:14:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [December 30, 2007, 12:14am UTC](https://www.ruby-forum.com/t/ruby-on-fastcgi-apache/124538/1 "2007-12-30T00:14:00Z")

</div>

I got an free hosting package with ruby on rails based on Fastcgi (Part  
of Apache). I do not have SSH access, so I can not create applications  
on the server. Therefore I want to bring my own applications (I created  
on FreeBSD) to the server. But it does not work, I have no idea how to  
tell the server to execute the ruby files.

My home direction looks like:  
/etc  
/mail  
/public\_ftp  
/public\_html  
/tmp  
/www

(the /www is an alias to /public\_html)

inside the /public\_html there is a Folder called /cgi I tried to place  
my application there instead of the /public\_html direction but it does  
not work. Can you please help me, because the hosting provider does not  
know enough about Ruby on Rails to help me, he just installed a Package  
and it said Ruby on Rails was successful added !

Regrades Snoop1990

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [December 30, 2007, 12:16am UTC](https://www.ruby-forum.com/t/ruby-on-fastcgi-apache/124538/2 "2007-12-30T00:16:16Z")

</div>

By the way I already found this on an other free webhost using a similar  
setup !

[http://www.profusehost.net/forum/knowledge-base/10540-how-run-ruby-rails.html](http://www.profusehost.net/forum/knowledge-base/10540-how-run-ruby-rails.html)

I did that but I do not know where to place the files !

---

<div class="post-metadata">

**Author:** ![snoop1990](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@snoop1990](https://www.ruby-forum.com/u/snoop1990)\
**Post date:** [December 30, 2007, 1:10am UTC](https://www.ruby-forum.com/t/ruby-on-fastcgi-apache/124538/3 "2007-12-30T01:10:12Z")

</div>

Ok I found out I have to use /public\_html/cgi-bin/

I tried an easy ruby script (called script1.rb)

#!/usr/bin/ruby  
puts ‘Hello World!’

and get:  
"Internal Server Error  
The server encountered an internal error or misconfiguration and was  
unable to complete your request.

Please contact the server administrator, removed\_email\_address@domain.invalid and inform  
them of the time the error occurred, and anything you might have done  
that may have caused the error.

More information about this error may be available in the server error  
log.

Additionally, a 404 Not Found error was encountered while trying to use  
an ErrorDocument to handle the request.  
Apache/1.3.37 Server at [xxxxxxxx.net](http://xxxxxxxx.net) Port 80" (I killed the changed the  
names!)

I also tried the application I had compile on freebsd  
I opened : [http://xxxxxxxx.net/cgi-bin/](http://xxxxxxxx.net/cgi-bin/)/public/dispatch.cgi

and get : “Application error  
Rails application failed to start properly”"

I also tried [http://xxxxxxxx.net/cgi-bin/](http://xxxxxxxx.net/cgi-bin/)/public/dispatch.fcgi

But there was no out put, just a clear page.

So the directory /public\_html/cgi-bin is executable, but I do not know  
how to use it. My application is a folder with some subfolders (an  
standard rails application). Is it possible to execute these  
applications with FastCgi ?
