UPDATED INFO ON RAILO INSTALL!
I got most of this information from HERE, but I changed a few things to suit my installation.
Installing Railo on Ubuntu
Get apache2 installed, although it may already be installed on most Ubuntu installs.
apt-get install apache2Install Sun's JDK
apt-get install sun-java6-jdkInstall tomcat
wget http://www.poolsaboveground.com/apache/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gzNeed to set JAVA_HOME var: (we'll take care of this in the tomcat startup script later)
tar xvf apache-tomcat-6.0.18.tar.gz
mv apache-tomcat-6.0.18 tomcat
mv tomcat /usr/share/
export JAVA_HOME=/usr/lib/jvm/java-6-sun
Create /etc/init.d/tomcat:
# Tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
export JAVA_HOME=/usr/lib/jvm/java-6-sun
case $1 in
start)
sh /usr/share/tomcat/bin/startup.sh
;;
stop)
sh /usr/share/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/share/tomcat/bin/shutdown.sh
sh /usr/share/tomcat/bin/startup.sh
;;
esac
exit 0
Make the permissions correct:
chmod 755 /etc/init.d/tomcat
Make tomcat startup on server reboot, etc.
cd /etc/init.d
update-rc.d tomcat defaults
Installing Railo into Tomcat
Get to some temp directory,
wget http://www.railo-technologies.com/railo/remote/download/3.0.2.001/custom/all/railo-3.0.2.001-jars.tar.gzEdit /usr/share/tomcat/conf/web.xml (add this in there)
tar xvf railo-3.0.2.001-jars.tar.gz
cp railo-3.0.2.001-jars/* /usr/share/tomcat/lib
<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>
ALSO add these lines:
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.cfml</welcome-file>
Install mod_jk to connect Apache and Tomcat
apt-get install libapache2-mod-jk
Edit /etc/apache2/workers.properties (to look like this)
worker.list=defaultEdit /etc/apache2/httpd.conf (add these lines)
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
# Mod_jk settingsEdit /usr/share/tomcat/conf/server.xml (add this HOST entry)
JkWorkersFile workers.properties
DirectoryIndex index.html index.htm index.cfm index.cfml
<Host name="your.url.com" appBase="/var/www/vhosts/yoursite">Finally, add these lines in the vhost file for the site(s) to match the HOST entry above
<Context path="" docBase=""/>
</Host>
JkMount /*.cfm defaultStop and restart both tomcat and apache:
JkMount /*.cfc default
DirectoryIndex index.cfm index.cfml index.php index.htm index.html
/etc/init.d/apache2 restart
/etc/init.d/tomcat restart