Recently I had to build a ColdFusion site on a server that didn't have ColdFusion, and what with it's hefty price tag, the admin team weren't in no rush to get a ColdFusion license. So this is when we come up with Railo, an open source alternative to ColdFusion... and I gotta say, in many ways it surpasses ColdFusion!
However, the first issue I came upon was when I tried to install it alongside Apache on my Windows Server 2003 box, the documentation on the Railo site fell slightly short in detailing this. So I had to do some digging myself and finally got it up and running, here is a step-by-step guide for you.
LoadModule block. Under the last LoadModule add the followingLoadModule caucho_module D:/Railo/win32/apache-2.2/mod_caucho.dll
Take note that the path above must lead to your Railo directory path.
VirtualHost of the site that you want to run Railo, so go to the VirtualHost block containing your site (there are several places you could have put this) and add the following (marked in green)<VirtualHost *:80>
ServerName sitename.local
DocumentRoot E:/path/to/site
ResinConfigServer localhost 6800
<Location /caucho-status>
SetHandler caucho-status
</Location>
</VirtualHost>
The above tells Apache that we want to use Resin and Railo (defaulted to port 6800) for this site.
<cluster id="app-tier">. Now find it's matching end tag </cluster> and add the below just before this end tag (so it's inside the <cluster id="app-tier"></cluster>)<host id="sitename.local">
<web-app id="/" root-directory="E:/path/to/site"/>
</host>
The aboveroot-directorymust match your ApacheVitualHostDocumentRoot. It's also worth pointing out that Railo will not see any Application.cfc above this root folder, so you will have to move your Application.cfc in to the top level folder (in this case the E:/path/to/site folder).
Server: http://sitename.local/railo-context/admin/server.cfm
Web: http://sitename.local/railo-context/admin/web.cfm
If you are receiving a lovely 403 error message on your site, then chances are this is because Apache is refusing access to some files. To overcome this, add the following to your VirtualHost block:
<Directory E:/path/to/site>
Options +FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
Don't forget to follow step 8 above again after making this change.
Comments
Hi, I've tried 3 times with the above setup on apache 2.2 and Railo with resin. This is the error I'm getting: Railo 3.1.2.001 Error (Missinginclude) Message Page /test.cfm [C:\erailo\webapps\ROOT\test.cfm] not found Java Stacktrace Page /test.cfm [C:\erailo\webapps\ROOT\test.cfm] not found at railo.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:117):117 at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:615):615 at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:35):35 at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:24):24 at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1709):1709 at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:261):261 at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32 at javax.servlet.http.HttpServlet.service(HttpServlet.java:91):91 at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:103):103 at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:187):187 at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:265):265 at com.caucho.server.hmux.HmuxRequest.handleRequest(HmuxRequest.java:436):436 at com.caucho.server.port.TcpConnection.run(TcpConnection.java:682):682 at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:743):743 at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:662):662 at java.lang.Thread.run(Unknown Source):-1 Its frustrating getting Railo up, until it becomes easier I don't see we can give php a run for its money, even though this is a superior solution. Best, Pardeep.
Thanks for this guide, was able to get Railo and Apache running wtihout too much trouble.
Hey Steve - I recently had to resinstall Railo, and it looks like now the default Resin port has been changed from 6800 to 6802. So in the above Apache virtual host example you might want to make note of that: older config: ResinConfigServer localhost 6800 newer config: ResinConfigServer localhost 6802 To find out which port Resin is using, you need to look in resin.conf for the following line:
Hope that helps some folks, I had a devil of a time figuring out why my old Apache settings weren't working after reinstalling Railo.
Crap, the code got stripped...let me try again. The line in the resin.conf file is <server id="" address="127.0.0.1" port="6802"/>
Many thanks for the post. Install was flawless on Win2008 server.
Post a Comment