Installing Railo 3 on SUSE 10 with Apache2 and Tomcat: Part 2
In my previous post we set up our SUSE 10 VM, Installed Apache and Tomcat and got Tomcat to start up without throwing any error messages. In this post we will continue with the installation of Railo and then hook Tomcat up to Apache, and finally make an index.cfm page and check that everything is working.
Installing Railo
For this particular setup we will be using the Railo Custom distributon, which you can download from http://railo.ch/en/index.cfm?treeID=224. In Putty I did the following.cd /home
mkdir data
cd /data
wget http://railo.ch/down.cfm?item=/railo/remote/download/3.0.2.001/custom/all/railo-3.0.2.001-jars.tar.gz
tar xvf railo-3.0.2.001-jars.tar.gz
mv railo-3.0.2.001-jars/* /usr/local/tomcat/lib
rm -r railo-3.0.2.001-jars
Setting Up Tomcat
If you have trouble with vi or vim then take a look at this quick reference.vim /usr/local/tomcat/conf/web.xml
<servlet>
<servlet-name>CFMLServlet</servlet-name>
<servlet-class>railo.loader.servlet.CFMLServlet</servlet-class>
<init-param>
<param-name>configuration</param-name>
<param-value>{web-root-directory}/WEB-INF/railo/</param-value>
<description>Configuraton directory</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfm</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfml</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CFMLServlet</servlet-name>
<url-pattern>*.cfc</url-pattern>
</servlet-mapping>
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.cfml</welcome-file>
<Host name="localhost" appBase="/webapps/railo">
<Context path="" docBase="/var/www/htdocs"/>
</Host>
Hooking Up Apache and Tomcat
To hook Apache and Tomcat together we need to set up a workers.properties file which specifies things like the Tomcat default port, host, connector type etc. The file contents are as follows.worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
# settings for Mod_jk
JkWorkersFile workers.properties
DirectoryIndex index.html index.htm index.cfm index.cfml
JkMount /*.cfm default
Finishing Up
Now we just need to create a simple .cfm file in /srv/www/htdocs, restart Apache and Tomcat and we are good to test our installation.The Time Now is: <cfoutput>#now()#</cfoutput>

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

I will blog the details soon, and again, not sure this is a recommended method, but it works!
Cheers,
Jamie
Best,
Jamie
Can you explain this:
<Host name="localhost" appBase="/webapps/railo">
<Context path="" docBase="/var/www/htdocs"/>
</Host>
So is /var/www/htdocs where you would store your web files? What is the appBase?
The reason I ask is that it looks like mine is pointing in the /webapps directory instead of the root of my webserver.
Thanks,
Chris
that may well be a mistake on my part since we haven't deployed railo as a war or an ear in this case so we don't have a railo deployment in the webapps directory.
I believe the appBase should be pointing to the root of your virtual host in this case. Either way it doesn't seem to have an effect. I even tested it by leaving out the appBase all together and it didnt seem to have an effect.
To be completely honest I am not entirely sure if we even need the appBase in this case. I will ask Gert Franz.
according to Gert Franz from Railo: if the appbase and the codebase are the same directory you will end up with a web-inf directory in every subdirectory of your webroot.
And after testing it I can confirm that is exactly what happens.
Apache2.2, Tomcat 6
DirectoryIndex index.cfm
Thought I did it, but it was just the default host, not the one I was trying. Glad it's Friday! :)