Topic: questions about configuring unicorn

I've been asked to get some RoR apps running inside unicorn. (on RHEL6)
This is my first time using RoR.
I installed ruby, and the unicorn gem. Did a rails new myapp,
My question. How does unicorn know about myapp? Is that part of the 'rails new myapp' ?
I have other apps on another server. I'd like to be able to copy them over to my server, and bounce unicorn, but obviously, unicorn wouldn't be aware of my app. Can someone explain how this is configured? I've searched the node, and I don't see a file called unicorn.conf.rb

Re: questions about configuring unicorn

That was helpful. Thanks.
So, I got that far, and my app does show up.
I plan on having several apps run on the same server. How can I accomplish that.
I want it to be:
www.myserverhostname.com/app1
www.myserverhostname.com/app2

I got my first app working. It works if I go to just the domain (www.myserverhostname.com), but I want it to be reachable if I go to www.myserverhostname.com/app1 (it shows a routing error.)

So, my questions are,
1. How can I run my app, so that it only responds to www.myserverhostname.com/app1
2. How can I run multiple apps at the same time, each with a unique URL.

thanks for the help

Re: questions about configuring unicorn

Use sub domains so instead of
www.myserverhostname.com/app1
You would have
www.myserverhostname.com.app1 then just set the root path to a sub folder.
nginx will handle the sub domain routing for you

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: questions about configuring unicorn

Thanks for the reply. I currently work in a very strict environment, where requesting additional subdomains isn't an option.
So far I've been testing without nginx. I was hoping it would work both with and without nginx.

Re: questions about configuring unicorn

In which case, just like any other website  www.myserverhostname.com/app1 is a folder within the structure of your app and you just need to set up your controllers and routes accordingly.
You might find this link usefull, it helped me a huge amount when trying to work out the best approach to namespacing
http://icebergist.com/posts/restful-adm … caffolding

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)