LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Ruby/Rails (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=20)
-   -   How to setup a subdomain for mongrel (http://www.litespeedtech.com/support/forum/showthread.php?t=527)

gernot 08-12-2006 02:25 AM

How to setup a subdomain for mongrel
 
Hi

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 www.domain.com and my second app through www.domain.com:9000

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

Thanks very much for any help

Gernot Kogler

xing 08-12-2006 09:09 AM

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 www.mydomain.com
B. A different vhost with domains field set to ap2.mydomain.com

4) Restart

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

mistwang 08-12-2006 09:39 AM

And, don't forget to add a dns record pointing app.mydomain.com to your server.

gernot 08-12-2006 11:05 PM

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 :-)


All times are GMT -7. The time now is 03:59 AM.