How to setup a subdomain for mongrel

Discussion in 'Ruby/Rails' started by gernot, Aug 12, 2006.

  1. gernot

    gernot New Member


    I've tried so hard but I can't find out how to do it. Here's what I want to do:

    I've set up a new server and deployed two rails apps to it. The first one is my site app, the second one is an application.

    I have two mongrel clusters running serving those two apps and I've created a listener and a virtual host for each. I can now reach my site app through and my second app through

    All works fine, but I want to have the url for my second application. How am I supposed to configure that ?

    Thanks very much for any help

    Gernot Kogler
  2. xing

    xing LiteSpeed Staff

    Gernot, try this:

    Multiple vhosts (domains) can be bound to a Listener (IP:port).

    1) Login to web admin

    2) Go to "Listeners" and you should have just one listener using port 80.

    3) Go to port 80 listener and in the "Virtual Host Mapping" make sure there are two entires. Add or edit entries as necessary.

    A. A vhost with domains field set to
    B. A different vhost with domains field set to

    4) Restart

    For above it is assumed you already have 2 virtual hosts setup, one for www. and one for ap2.
  3. mistwang

    mistwang LiteSpeed Staff

    And, don't forget to add a dns record pointing to your server.
  4. gernot

    gernot New Member

    Thank you very much, works perfectly. I thought it should work this way and tried it before, but I had my vhosts messed up. I cleaned out all the experimental stuff and did a clean new setup and it works now as expected.

    I like litespeed very much. It's flexible and fast :)

Share This Page