How to Enable Railo for a Domain





Here i am showing you how to enable railo for the domain, 'sudosu.in'. Document root of sudosu.in is '/home/sudosu/public_html'.

Open /opt/railo/tomcat/conf/server.xml in your favourite editor like vim or nano and add the following code section in it.

You have to edit the following code by your domain name and it's document root.

<Host name="sudosu.in" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
   <Context path="" docBase="/home/sudosu/public_html" />
   <Alias>www.sudosu.in</Alias>
</Host>


Restart railo service once you have sone the above changes.


root@railo [~]# /etc/init.d/railo_ctl restart

Once you have restarted railo, check if the service is started or not. If there is any errors the service will ne be started and it will show 'No PID found' while checking the railo status.

root@railo [~]# /etc/init.d/railo_ctl status
 * Railo/Tomcat is running (PID: 1979)

If the PID of railo is not running even after restarting railo, you have to check railo log to sort out the issue.
The following log wil help to find the issue.

root@railo [~]# tail -f /opt/railo/tomcat/logs/catalina.out 


It will take time to completly UP the railo service, depending upon the number of sites added in server.xml it will vary.
Once you have done the above steps, the following url will be available for you.

http://www.sudosu.in/railo-context/admin/web.cfm

You can create a test cfm page using the following code. Save these contents in test.cfm file and copy it in the document root of the domain and access www.sudosu.in/test.cfm.

Test CFM Page


<cfset myVar="Hello World!">
<cfoutput>#myVar#</cfoutput>
<cfoutput>#Now()#</cfoutput>



This entry was posted in by Arun Ghosh. Bookmark the permalink.