Multiple Apps - Single Domain

Can someone share, or point me to an nginx config example for running
multiple applications underneath the same domain.

eg: http://mydomain.com/application1 and
http://mydomain.com/application2.

Setting ActionController::AbstractRequest.relative_url_root =
“/application1” on the Rails side in config/environments/production.rb.
I’m pretty sure I can hack this out myself, but an example would be
nice.

Thanks!
-Steve-

On Sun, Nov 18, 2007 at 10:13:46PM +0100, Stephen A. wrote:

Can someone share, or point me to an nginx config example for running
multiple applications underneath the same domain.

eg: http://mydomain.com/application1 and
http://mydomain.com/application2.

Setting ActionController::AbstractRequest.relative_url_root =
“/application1” on the Rails side in config/environments/production.rb.
I’m pretty sure I can hack this out myself, but an example would be
nice.

I do noy understand the question, because I do not Rails.
May this help:

 server {
    server_name  mydomain.com;

    location /application1 {
        proxy_pass   http://localhost:8000;
    }

    location /application2 {
        proxy_pass   http://localhost:8001;
    }
}