Wednesday, July 30, 2014

Railo 4.2.1.0 Install on Windows with Apache (not IIS) Problem

I will have a longer post soon on this (I hope).

If you are installing a new copy of Railo on a Windows server with Apache (not IIS) using the Railo installer which comes with tomcat, and at the end of the installation your web browser only comes up with a "not found" 404 error, then you might be having the same problem I was having.  The Railo service starts, but then stops (like the Railo service crashes with no errors).

If you look in the railo\tomcat\logs folder you will see the commons-daemon.yyy-mm-dd.log, in that you will see a few errors that look like: "Commons Daemon procrun failed with exit value: 4 (failed to run service)" and "The service process could not connect to the service controller."  These errors don't lead far, but the next place to look is the catalina.yyyy-mm-dd.log.

In there you will see errors like: "SEVERE: A child container failed during start" above that error is the issue, if you are using Apache (like you should on a Windows server) you don't have a "C:\inetpub\wwwroot" folder.

The installer defaults the server.xml to contain the following entry: "<context path="" docbase="C:\inetpub\wwwroot\">".  Simply edit the c:\railo\tomcat\conf\server.xml file with notepad and change the entry to read "docBase="C:\apache\htdocs\" instead.  Save the server.xml file and restart the railo service and you should be able to browse to http://127.0.0.1:8888/index.cfm to see the "Welcome to the Railo World" page.

To have your Apache web site in htdocs be able to handle ColdFusion pages, you need to make an entry in the server.xml file for the default web site on Apache.  To do this, add the following before the "</Engine>" tag toward the bottom:
<Host name="[your ip address or DNS name for Apache]" appbase="webapps" >
    <context docbase="C:\apache\htdocs\" path="" />
</Host>


Now you should be able to add a index.cfm page to your htdocs folder and have it display properly.

Popular Posts