Railo: Configuring New Webs
Railo offers something thats called a Web. A Railo Web is a webroot that has it's own WEB-INF directory that allows you to manage the settings separately.
So what does that mean exactly? Well when I administer my Railo web using the Railo Web Administrator I can manage my web completely separate from all other Webs including Datasources, debugging settings, Locale/Time zone and just about all other settings but they only affect my Web. In Adobe CF all these settings are global to all sites on the same server, Railo separates all of this into Railo Webs.
Creating a Railo Web
The process of creating a Railo Web is pretty easy though it is a manual process. The first thing you need to do is edit the resin.conf file located inYou do have to restart the Railo server after creating a new web but that takes all of 2 seconds.
<host id="myrailo" root-directory="c:\projects">
<web-app id="/" root-directory="myrailo"/>
</host>
On restart Railo creates your new Web and adds a bunch of files and directories in the WEB-INF directory.
Configuring the Hosts file
We aren't quite done yet since we created the web with the host ID of myRailo we need to add an entry in our hosts file to correspond to our host id. In windows thats underOpen your browser to http://myrailo:8600/railo-context/admin/index.cfm to get to the Web Administrator panel. You will have to create a new password and then you can start administering your Web.
Whats the Benefit?
Well the biggest benefit is complete isolation of resources. A Railo web can be completely and separately managed from all other Webs without affecting any of the other webs. Each Railo web can have it's very own Time Zone! I struggle with this on my own Blog. My blog is hosted in Virginia with the EST timezone but I am in Munich which is GMT +1. All my posts reflect the EST time zone because it's sever wide. If my host was using Railo he could create a Railo Web for me and I could manage my own site, create my own DSN's, Mappings and everything without worrying that I mess anything up outside of my own web.Naturally of course the Server administrator can turn on and off what can be done in the Web administrator. You can define how many DSN can be created, limit file access to within the webroot or restrict it etc.
The biggest benefit I see to this is a very easy way to set up a Railo Hosting service. Now if only I had my own server!

Subscribe
Subscribe via RSS
Follow me on Twitter
Or, Receive daily updates via email.
Tags
adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript max2007 max2008 misc open source programming railo software technology ui
Recent Entries
Converting structkeys to lowercase
Blogroll
An Architect's View
CFSilence
Rey Bango
TalkingTree

Do you also know how to do this with JBoss?
thx Markus
There isn't a default username/password for the admin, at least not what I have experienced. When you install Railo for the first time and go to the admin panel you are prompted to enter a password, that becomes the password for the admin and root context.
@Markus,
Nope haven't done it yet with JBoss but will post about that once I've tried it out :) Unless someone beats me to it.
1) Everything just gave an error like:
[C:\Program Files\Railo\webapps\ROOT\mysite\index.cfm] not found.
Except my localhost is on F.
I found a blog post about configuring "resin.conf" so I fiddled with that and the host location and worked.
2) Now I just get an error about no SMPT configured. When I try to add one in the server admin ('update', I suppose), it just disappears. I tried 'verify' instead and get a message saying:
Element at position [1] doesn't exist in array.
So, I'm still stuck.
Anyone know what to do? Ideas???
Not sure what you mean that your localhost is on F drive, do you mean through IIS? The default install of Railo has it's own web-server.
So when you install Railo it drops it in the location that you specific so with default install on windows it puts it in: C:\Program Files\Railo\
or localhost:8600/
The default host in the resin.conf file looks like:
<host id="" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id="/" root-directory="webapps/ROOT"/>
<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
<!--
- Administration application /resin-admin
-
- password is the md5 hash of the password.
- localhost is true to limit access to the localhost
-->
<prologue>
<resin:set var="resin_admin_password" value=""/>
<resin:set var="resin_admin_localhost" value="true"/>
</prologue>
</web-app>
</host>
To add a new one oustide of the C:\Program Files\Railo\ directory just do the following:
<host id="testweb" root-directory="c:\projects">
<web-app id="/" root-directory="testweb"/>
</host>
then in your hosts file add an entry for your localhost like so:
"127.0.0.1 testweb" (without the quotes)
then once you have an index page in the folder go to http://testweb:8600/index.cfm
Thats all I did and it worked just fine just like I wrote in my blog entry
As a temporary work around you can add a mail server manually (manual entry solution provided by
Christoph Smitz on railo_talk).
Open railo-web.xml.cfm and look for the <mail> tag.
Between opening and closing tag add your server:
<server password="yourpass" port="25" smtp="yourserver"
username="yourusername"/>
Yes, my sites are sitting on F:. What I did was change the line between host tags in resin.conf:
<web-app id="/" root-directory="webapps/ROOT"/>
to:
<web-app id="/" root-directory="f:"/>
and those errors stopped. I have no idea if that's right or not.
I searched for the file you mention; there are 3. I added the line to all of them one by one after another mail related tag and still get the same error after restarts:
Railo 3.0.0.005 Error (Railo.runtime.net.mail.mailexception)
Message no SMTP Server defined
I then removed the cfmail tag from the errorhandler the error was referencing and now get only debugging output, no output at all on my main index.cfm page. Everything else seems to come up fine.
So:
1) Any other ideas on the mailserver? Is it only on windows or something this bug?
2) I turned off debugging, so now zero output on my main index page for some reason (ideas???), but how do you know where to set things in the admin? I turned off debugging in the server admin first, thinking everything there is server wide, and that did nothing. Then did it in the web admin and that turned it off.
3) where is the error log? I can't find it, it's not in the "logs" folder.
They really need to add a help/install file so we can get going with what sounds like a great product! A help button in the admin would be good.
Thanks again for any help.
Correction, I added them inside the mail tag as supposed to.
Gert replied to me - how does he find the time? - and noted the yahoo group where I saw your post, thanks. I'll post there.
That would most likely use more resources but would make the configuration a little bit easier I guess.
Has anyone managed to create webs with railo in jboss?
As to webs on JBoss I haven't tried it yet.
it may be a little easier upfront but I wouldn't think it to be the best approach, I would rather be able to create my web contexts and have only one engine running and save the server resources.
As soon as I figure out how, or someone tells me how, to configure the webs for railo on jboss I will definitely post it.
on jboss wit multiple web-contexts. In post a tutorial on my blog.
markus