Search code examples
ruby-on-railsosx-snow-leopardpassenger

Phusion Passenger Preference Pane Multiple Apps


I have a single application running on a Snow Leopard machine called "examplemachine" which is deployed by Phusion Passenger Preference Pane. When I visit "examplemachine.local" from another machine on the same network, they can use this application with no problem.

The difficulty comes when I want to add another application. Simply adding that application to the pane and giving it an address of "newapp.local," for example, makes it so that the application is accessible from the machine it's actually created on, but no other machines on the same network can see it.

I'm not super familiar with Apache, vhosts, etc. It's just for a small project or two, and if I could get some advice on setting this up it'd be great.

Have scoured the internet for a solution, but nothing I've found deals with anything other than multiple apps on a single local machine in Passenger Preference Pane.


Solution

  • As far as I'm aware, if you want to access rails apps from another machine on a local network you will have to setup an entry in that machines hosts file. e.g. Given the machine that is hosting the rails apps is at 10.1.1.2 you could add to the other machines hosts file:

    10.1.1.2       examplemachine.local
    10.1.1.2       anotherrailsapp.local
    

    on windows this file is I think usually found at:

    c:\windows\system32\drivers\etc\hosts
    

    and mac

    /etc/hosts
    

    Hope this helps.