Multiple rails applications under one domain

Jim Rowe wrote:

I have recently bought rails hosting and installed my first rails app, brilliant framework!

I have another application in the pipeline as well as a number of legacy PHP applications which I wish to move to the same host - in the long run I would transfer the old domain across but not until I have the legacy code up and running.

The problem is this - how do I add old PHP code, and perhaps a second rails application, within another rails app?

At present I am hosted on and my domain points to a www folder (a link to my rails apps public folder). I added another link inside my apps public folder that linked ot the public folder of my second rails app but of course all of the requests are still processed by the 1st rails app.

Any ideas or help is VERY welcome!

Thanks in advance.

Jim, if you have other rail app, you can add a subdomain That would create 'rails2app' folder in your public_html. Delete this folder and create symlink to your 2nd rails app instead.

something like
ln -s ~/apps/rails2app/current/public/ ~/public_html/rails2app

hope these helps,

Jim Rowe wrote:

Hi Bojan,

Thanks for reply.

Problem is my ~/public_html is already a symlink direct to my current apps public folder. I have been trying to create a real public_html folder with symlinks to my two apps, I would need default requests to go to appOne, and requests to a specific subfolder to go to appTwo. Have tried working it out from some example but have got nowhere.

Anything you think might be useful would be good to read!


I think it shouldn't be problem if public_html is already a symlink, I have similiar configuration. These is how it directories looks in my case (typo is main website and dev is subdomain):

ls -l
public_html -> /home/sossi/apps/typo/public
ls -l public_html
dev -> /home/sossi/apps/mojgost/current/public/