Multiple Apps - Single Domain

Igor Sysoev is at rambler-co.ru
Mon Nov 19 09:54:03 MSK 2007


On Sun, Nov 18, 2007 at 10:13:46PM +0100, Stephen Anderson 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;
        }
    }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list