The Power of Railo Webs

{ Posted By : Eric Cobb on February 13, 2009 }
1270 Views
Related Categories: Railo

Railo Webs are awesome! For those that don't know what a Railo "Web" is, it's basically a way to give each (Railo) CF site on your server its own private settings. Each Railo Web is completely independent from other Railo Webs. So if you've got 10 websites, and every one of them wants a datasourse named "MyDSN" that points to a different database, that's not a problem. If every one of them wants a mapping named "MyMapping" pointing to a different file location, consider it done.

Both Gert Franz and Gary Gilbert have done an excellent job covering what "Webs" are and how to set them up, so I'm not going to expand on that right now. Rather, I want to take a minute and highlight some of the features that I really like about Railo Webs, and show you just how cool they are.

Railo Webs are a dream come true for a web hosting company. You have a core Railo Server, that configures and manages the settings for every CF site using it, and then you have individual "Webs", which allow each of the sites their own private settings. Here are a few situations where a Railo "Web" would come in handy:

Your users want to manage their own datasources? They can.
Your users want to be able to enable and disable debugging? They can.
Your users want to create their own mappings? They can.
Your users want to disable support for Application.cfm and only use Application.cfc for their site? They can.
Your users want to set the server to automatically default all of their unscoped CFC variables to the "local" scope? They can.

All of these things can be done to a Railo Web without affecting any of the other CF sites on the Server. Got your attention yet? It gets better. Here's a list of some of my favorite things that you can set up inside an individual Railo Web:

  • Each Web can have its own datasources
  • Each web can enable/disable debugging without affecting other sites
  • Each individual Web can specify its own time zone.
  • Enable/Disable Session and Client management on a per Web basis
  • Set different Session and Application timeouts on a per web basis
  • Each Web can specify its own mail servers
  • Each Web can have its own scheduled tasks
  • Each Web can have its own mappings
  • Each Web can have its own custom tags directory
  • Each Web has its own web based administrator

So, yeah, Railo Webs rock!

Comments
Brad Wood's Gravatar That sounds pretty cool. Question though-- is there an advantage to this over just creating an instance for every site? It is mainly just lower overhead?
# Posted By Brad Wood | 2/13/09 8:12 PM
Eric Cobb's Gravatar Lower overhead is probably the main advantage. That, and each individual website having its own private Administrator site to manage their own settings. As Gert put it, "If you use more than one instance, you spoil a lot of resources, since all the libraries of the engine are instanciated more than once"

I guess it's really going to depend on the individual sites as to which method is better. For high traffic, resource intensive sites, I can definitely see the need for separate instances. But for a server hosting multiple sites that are only going to get a few hundred hits per day, I think one core installation with multiple "web" configurations is the way to go.
# Posted By Eric Cobb | 2/14/09 12:43 AM
Todd Rafferty's Gravatar I was curious what strategies you were doing to protect your railo-context/admin/? With CF, on my CentOS box, I always moved the CFIDE to a internal directory so it was never exposed externally and symlinked as needed.
# Posted By Todd Rafferty | 2/26/09 11:19 AM