# Any luck installing RoR with apache / cpanel setup?

**URL:** <https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062>\
**Category:** Rails\
**Created:** [March 27, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062 "2006-03-27T20:40:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 27, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062/1 "2006-03-27T20:40:11Z")

</div>

i just went through installing RoR on a cpanel setup and everything  
seems to work except for deployment. i go through the entire process of  
setting up a new rails app on a cpanel account and i get:

Not Found  
The requested URL /testapp/index.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use  
an ErrorDocument to handle the request.  
Apache/1.3.34 Server at [media.mymediaglo.com](http://media.mymediaglo.com) Port 80

is there anyone out there that has had a successful implementation of  
this?

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 27, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062/2 "2006-03-27T20:53:08Z")

</div>

not sure who your hosting company is, but with mine here’s how i set up  
a rails app at my hosting  
company ([networkredux.com](http://networkredux.com)):

There are two paths you can go down,

1. I want a rails application to run on my main domain at the root  
level, e.g. [mydomain.com](http://mydomain.com)
2. I want to run multiple rails applications or not make my rails  
application my root application.

Path 1.  
You need to point apache to your rails applications public directory,  
this can be done using an ssh  
session and creating a symbolic link.  
e.g.  
ssh [youraccount.com](http://youraccount.com)  
rails railsapp  
mv public\_html public\_html\_bak  
ln -s ~/railsapp/public ~/public\_html

Path 2.  
First, login to cpanel and create your new subdomain, we will call this  
subdomain rails for the example.  
Now ssh into your account, and remove the directory cpanel created and  
replace it with a symbolic link  
to your rails application.  
e.g.  
rails railsapp  
cd ~/public\_html  
rm -r -f rails  
ln -s ~/railsapp/public ~/public\_html/rails

Josh K. \<jjkiesch@…\> writes:

> i just went through installing RoR on a cpanel setup and everything  
> seems to work except for deployment. i go through the entire process of  
> setting up a new rails app on a cpanel account and i get:
> 
> Not Found  
> The requested URL /testapp/index.html was not found on this server.
> 
> Additionally, a 404 Not Found error was encountered while trying to use  
> an ErrorDocument to handle the request.  
> Apache/1.3.34 Server at [media.mymediaglo.com](http://media.mymediaglo.com) Port 80
> 
> is there anyone out there that has had a successful implementation of  
> this?

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 27, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062/3 "2006-03-27T21:29:35Z")

</div>

i haven’t tried your 2nd method yet, but i will be needing that one soon  
to. the first one worked! YAY!

are there any drawbacks to doing it this way? the tutorial on the rails  
wiki made it seem so much more complicated.

---

<div class="post-metadata">

**Author:** ![jjkiesch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Post date:** [March 27, 2006, 9:58pm UTC](https://www.ruby-forum.com/t/any-luck-installing-ror-with-apache-cpanel-setup/56062/4 "2006-03-27T21:58:34Z")

</div>

it can get more tricky when you incorporate fastcgi into the mix. below  
are some notes on that. if you start running your app in ‘production’,  
which’ll give you a huge speed boost, you may have to force apache to  
reload when you make changes to your app. the way to do this is  
add/delete a dummy subdomain so that apache is forced to reload itself.  
try not to do this too often though as it could impact performance for  
others on the same server.

FastCGI is very tricky to debug and most of the time an error is for a  
random reason. Here are few tips for working with FastCGI.

1. Always make sure your running in production mode by setting this in  
environment.rb

2. When you switch from cgi to fastcgi, completely exit your browser  
application before trying to access the site again, the reason being  
that the cgi and fastcgi processes cannot share session information.

3. To switch to fastcgi mode, edit the .htaccess file in railsapp/public  
and change dispatch.cgi to dispatch.fcgi

4. Your permission settings are a little different for FastCGI mode vs.  
CGI  
mode. Your /railsapp/log directory needs to be 777 so the fastcgi  
process can write to the fastcgi crash log.

5. Your process will not stay running because network redux use dynamic  
fastcgi processes. If your site is not being used then apache will try  
and kill your processes to conserve resources in our shared environment.

6. Make sure there are no errors or warnings, this can cause problems.

Josh K. wrote:

> i haven’t tried your 2nd method yet, but i will be needing that one soon  
> to. the first one worked! YAY!
> 
> are there any drawbacks to doing it this way? the tutorial on the rails  
> wiki made it seem so much more complicated.
