Trying Railo 3 instead of Adobe's Coldfusion

My wife's off partying, and I'm off replacing one of my best friends: Coldfusion app. server.
Since I have a small dedicated server, I was facing the necessary license costs for Coldfusion 8, or so I thought!
Now that I've read about the opensource cfml alternatives, I am really impressed! Never thought that those alternatives could be as good as Adobe's product itself, but damn, it sure looks like it!
So tonight, it's install time.

First thing I noticed:
- railo doesn't seem to accept c++ cfx tags. Damn, means rewriting some code (cfx_zip, cfx_image, cfx_encrypt, cfx_nslookup)

Installation went smoothly, and I could easily access the railo admin via a shortcut in the start menu.
After going through some of the settings, I actually just want to see if my code works on Railo! So I stopped the Coldfusion service, an opened up my httpd.conf (apache 2.2). I commented out the 'jrun settings' lines, and followed the railo-apache instructions. Or, well, the instructions are pretty much outdated, but it pointed into the right direction.
[...] Or so I thought! Aaarggh, software without documentation is like software that does not exist. I have just spent 4 hours trying to get an application to work with the combination of Apache 2.2 + Resin 3.1 + Railo 3.0. No fun at all!

The problem seemed to be the fact that Resin could not be contacted by apache, and Apache therefor constantly threw 503 errors. No error logging was done by any of the programs, so I just had to try to get it to work by googling and changing the config files.
By pure luck I managed to get it to work; this is my edited and pretty default httpd.conf

:

[...]
LoadModule caucho_module "C:/Program Files/Railo/win32/apache-2.2/mod_caucho.dll"
ResinConfigServer 127.0.0.1 6800
#CauchoStatus yes
<Location /caucho-status>
SetHandler caucho-status
</Location>


And this is the edited resin.conf (which is pretty undocumented as a whole):

<!--
- Resin 3.1 configuration file.
-->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">
[...]
<dependency-check-interval>300s</dependency-check-interval>
[...]

<cluster id="app-tier">
<!-- sets the content root for the cluster, relative to server.root -->
<root-directory>.</root-directory>

<server-default>
<!-- The http port -->
<http address="*" port="8600"/>
[...]
</server-default>

<!-- define the servers in the cluster -->
<server id="" address="127.0.0.1" port="6800"/>

[...]

<host id="www.xitesystem.ik">
<web-app id="/" root-directory="C:/developing/xitesystem/trunk/"/>
</host>

<host id="www.tools.ik">
<web-app id="/" root-directory="C:/developing/tools/"/>
</host>

<host id="" root-directory=".">
[...]
</host>
[...]
</cluster>
</resin>

Damn, only now do I notice that part of the problem was the impatience I had! While testing, I always restarted the Railo service, then restarted the apache service, and then reloaded the browser page. Most of the time I would then get a 503 error, and I'd be pulling my hair out trying to get it to work. Only now I just noticed that if I reboot Apache 2 times, (or wait a bit longer??) the service does respond!

Okay, it's 3:00 in the morning, I should go to bed. I have seen my first app running correctly on Railo, that's great! The page loading is incredibly slow, but I guess it has something to do with the database drivers for mssql. I'll check it tomorrow :-/

del.icio.us Digg StumbleUpon Facebook Technorati Fav reddit Google Bookmarks
| Viewed 4877 times
  1. Grant

    #1 by Grant - October 15, 2011 at 11:39 PM

    Paul,

    I'm in a similar situation, looking to move an app to Railo. Although I've used CF since version 1.5, this is my first attempt to use Railo. I have what I think is a very simple question, but can find no answers anywhere --

    WHERE do I place CFX Tags in Railo so that my site can "see them". I have a CFX tag that is called CFX_Captcha.jar (not a C++ one). I've tried placing it in several different locations, restarting Railo, etc. but cannot register it in the Server Admin. Everytime I do Railo says it can't find it. I'm really stumped.

    It's a Windows 2008 Server and railo is in c:\railo.

    Best regards,
    Grant
  2. Paul Klinkenberg

    #2 by Paul Klinkenberg - October 17, 2011 at 12:19 PM

    Hi Grant,
    First you need to place the (cfx) jar file in the Railo lib directory.
    Then restart your servlet engine (tomcat / resin / etc.).
    Then, you can define the cfx tag in the Railo web or server admin: http://YOURSITE/railo-context/admin/web.cfm?action=resources.cfx_tags
    There is already one example entry there, cfx_helloworld.

    Good luck, Paul
(will not be published)
Leave this field empty