Forum: Rails deployment Help with sub-domain deployment?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
444c7d8579d3389a76c8497f5cb66c13?d=identicon&s=25 M.W. Mitchell (goodieboy)
on 2007-02-26 22:35

I have a host (A2 Hosting) that allows me to point different domains
at sub-folders for add-on domain hosting. I'd like to be able to run
diferent rails apps in each of those folders and one in the root also.
I figure I just need to make sure that the first url fragment never
has the name of a sub-folder/site set as a route name?

I'm a little confused on deployment. A2 Hosting says to do a "ln -s
rails_app/public public_html", but that seems too easy. Not sure what's
happening there...

They also have Mongrel, which I'm assuming is a server for rails apps?
Is this correct? If so, would it be better to use mongrel? Can mongrel
be setup so a subfolder of the web servers www directory can have
another separate rails app? Like this: - /public_html - /public_html/addonsite

Also, do I need Capistrano? Is that just a deployment helper? Not a
server is it? Ugh, this is all so confusing. And I thought it was soooo
easy to build my first rails app! :)

- matt
C381828d1907912eab30cbe38d5ea245?d=identicon&s=25 Aníbal Rojas (Guest)
on 2007-03-01 12:33
(Received via mailing list)

     Building the first Rails app is usually easy, deploying it
not :-)

     I am not sure about A2 setup, most of the shared hosting services
offering cheap accounts with support for Rails use Apache + FastCGI.
This means that Apache administers your Rails app starting it when a
request is received, letting it live for a while and then sutting it
down if no more requests reach Apache for a while (persistent process
are expensive)

     What does Apache + FastCGI expect from your app? A public
directory, including a .htaccess that routes the "dinamic" part of the
app (not the JS and imgaes usually) to dispatach.fcgi. This scripts is
responsible of handling the dinamic stuff in your app, initializing
Rails and feeding it with the request info, waiting for a response and
passing it back to Apache.

    If you have a app at your top domain just replace the public_html
(as it is usually named) with a symbolic link to your app public
folder. Be sure to check:

    - The path to Ruby interpreter at the top of the script to match
the actual path of the server
    - That .htaccess is setup to use the fcgi handler and not the cgi
handler (too slow)
    - That you force the production mode in the Rails configuration

    About the other apps living in subdomains, I am not sure if they
will be resolved if you create symbolics links in the app/public
folder to their public folder... Give it a try.

    I would recommend not to use Capistrano for the first time, until
you finally defined the layout of your setup. Then start working with
Capistrano to automate the deployment process. Capistranos has to be
added to your app, and configured. It relies eavily in SSH and SVN and
in shared hostings it could be a little more difficult to setup.

    Good luck.

Aníbal Rojas

On Feb 26, 5:35 pm, Matt Mitchell <>
This topic is locked and can not be replied to.