Railo Resin and Virtual hosts

by 3:43 AM 8 comments
With multiple projects running locally I prefer to use virtual hosts so I can browse to http://project1.local and http://project2.local rather than and

This is really easy in IIS ( point and click ).

Apache you have to touch some configuration files but there is alot of information out there on this.

With Resin it's also quite simple but there is far less information about this available.

I put together this walk through on the process.

And if your wondering about the performance of resin ( free edition ) Peter Bell's response should give you some confidence.

I run about 70 websites on Railo and Resin on a Win2k3 64bit server
with 8Gb of RAM and have excellent performance. Not to say it wouldn't
be better if I used the professional version.


Sample Virtual host block:

High Quality Version click here.

Setting up Resin Express.


  1. It's worth mentioning also that the default resin / railo config is to reload the entire resin server when the config files are changed. It's not a huge concern if you aren't making frequent changes to your virtual hosts. Unfortunately I have not found a better way to do virtual hosts when Resin is involved.

  2. You mention with this configuration Railo will have separate datasources and configurations per virtual hosts. I'm assuming the default example you showed where the virtual hosts were just setup on the IIS/hosts file side all shared the same configuration, correct?
    How would it handle a case where the configurations / datasources should be the same for say admin.virtualhost.com and www.virtualhosts.com?


  3. Good point. Railo have taken care of this. There is an "Over all" cfadmin section where you cna setup datasources or mappings across all sites. Ie you can set a mapping here to say /glabal and it will be available in each virtual host.

  4. Great - thanks Paul! Wanted to make sure you got the thank you at the end ;)

  5. Thank you very much. This was exactly what I was looking for. And it worked :-)

  6. Paul, thanks for the excellent guide!

  7. Thanks Paul!

    Not sure what my malfunction was, but I finally got this working on resin 3.1.2 on a directory outside the Resin install dir, but I had to use root-directory="../test" instead of the "c:\test" format that worked for you.

    Note that the url is relative and the slash is forward.

    Thanks again!

  8. By reading this article I get a lot of lessons and this is very useful .