# How can I use rails in my public\_html

**URL:** <https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012>\
**Category:** Rails\
**Created:** [December 6, 2008, 6:32am UTC](https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012 "2008-12-06T06:32:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tristan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tristan](https://www.ruby-forum.com/u/tristan)\
**Post date:** [December 6, 2008, 6:32am UTC](https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012/1 "2008-12-06T06:32:05Z")

</div>

I have no root permission on the server, only a public\_html in my  
$HOME.  
The http server is not apache; it only support cgi script.

Can I use rails in my public\_html?

---

<div class="post-metadata">

**Author:** ![tristan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tristan](https://www.ruby-forum.com/u/tristan)\
**Post date:** [December 6, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012/2 "2008-12-06T17:07:15Z")

</div>

I would find another host, personally. Ideally you would want the  
actual Rails application to live outside of public\_html. I always put  
mine in $HOME and create a symbolic link from $HOME/public\_html to  
RailsAppDir/public and that works fine.

You could most likely make this work if you wanted to use mod\_rewrite  
and a custom .htaccess files to route all reqests going to / to /  
RailsApp/public/dispatch.fcgi – Actually, in thinking about it, you  
could just modify the original rails .htaccess file to do this.

You’d probably need to put the rails app inside the cgi-bin though, if  
you don’t have permission to change the permissions on files to make  
dispatch executable.

---

<div class="post-metadata">

**Author:** ![tristan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tristan](https://www.ruby-forum.com/u/tristan)\
**Post date:** [December 6, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012/3 "2008-12-06T19:25:30Z")

</div>

I would echo Matt in many ways. If possible, I recommend getting a VPS  
somewhere and working with that because you will learn a lot of  
valuable information about how Rails works.

---

<div class="post-metadata">

**Author:** ![tristan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tristan](https://www.ruby-forum.com/u/tristan)\
**Post date:** [December 7, 2008, 2:18pm UTC](https://www.ruby-forum.com/t/how-can-i-use-rails-in-my-public-html/155012/4 "2008-12-07T14:18:02Z")

</div>

Thanks for your suggestion.

The difficult thing is our http server is not apache, so mod\_rewrite  
is not available.

The only way is to use cgi script, i think.  
But i have no idea how rails can be used only in a cgi approach.
