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 http://127.0.0.1/project1 and http://127.0.0.1/project2

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.


http://groups.google.com/group/railo/msg/047ea89dea7c9385

Sample Virtual host block:



High Quality Version click here.





Related:
Setting up Resin Express.


Paul Kukiel

Developer

Cras justo odio, dapibus ac facilisis in, egestas eget quam. Curabitur blandit tempus porttitor. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.

8 comments:

  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.

    ReplyDelete
  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?

    Thanks,
    Roy

    ReplyDelete
  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.

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

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

    ReplyDelete
  6. Paul, thanks for the excellent guide!

    ReplyDelete
  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!

    ReplyDelete
  8. That is a good idea with the ralio resin and virtual hosts. I will use it for my job. Look in here custom writing service
    thank you very much.

    ReplyDelete