This is repost of my contribution to the Railo Google Group.
Goal
You are a Railo and Tomcat newbie and you want a directory to put your coldfusion files in. “tomcat\myapp\ROOT” would do nicely
Preconditions (for me anyway)
- 64 bit Windows 7 home premium
- UAC turned off and stays off
- Java installed and JAVA_HOME set
Main Success Scenario
- Download Windows distribution
- Install to C:\railo
- Go to windows services and verify that Apache Tomcat Railo is running
- go to http://localhost:8888/index.cfm and the welcome to Railo should render
- <Comment> This page has a link to documentation called “creating new virtual hosts”. Note that this refers to Jetty and Resin but not Tomcat – hence this post </Comment>
- Use the Windows services control panel to stop Tomcat
- In your Windows hosts file (C:\Windows\System32\drivers\etc\hosts)
- create the entry:
- 127.0.0.1 myapp # Tomcat uses the host name to identify the requested application.
- create the directory c:\railo\tomcat\myapp
- create \myapp\ROOT. (This is where you will keep your application’s .cfm files)
- create \myapp\ROOT\index.cfm with the contents <cfdump var= “#CGI#”>
- goto “C:\railo\tomcat\conf\Catalina\
- create the directory \myapp
- copy \localhost\manager.xml to \myapp and rename it to ROOT.xml
- Edit C:\railo\tomcat\conf\server.xml
- Find the <Engine></Engine> node and insert
- <Host name=”myapp” appBase=”myapp”>
- <Context path=”keyapt” docBase=”C:\railo\tomcat\myapp” />
- Restart Tomcat. You will see /myapp/WEB-INF and /myapp/ROOT/WEB- INF directories appear by magic.
- Browse to http://myapp:8888/index.cfm and you should see the cfdump (Update 2011 Mar 29 – corrected URL)
- The goal is complete
Caveats
I am a complete newbie and although this is working for me I don’t know whether it is the right way to do it.
Dr. Bayley – found this post yesterday and while it may not be the proper procedure it seems to work just fine as far as I’ve taken it. The only thing I had to add to make the page display properly in the browser was to correct the url to
http://myapp:8888/index.cfm
Thank you for taking the time to publish this information – I had previously spent hours trying to figure out how this all should work!
Regards, John
Thank you for your kind words. I have now corrected the link. James
The Path variable in the server.xml file omits the \ROOT directory. Other than that, very useful, and thanks very much
Thanks for the feedback Ted. I have verified that at step 13
Context path=”keyapt” docBase=”C:\railo\tomcat\myapp”
is the correct setting for my installation. So if you have ROOT in there I guess that at step 15 you will be browsing to http://myapp:8888/ROOT/index.cfm but I have not verified this. James
Nce informative article. I used the explained way to use the same in cloud environment and there it helped me to understand more precisely. I used Jelastic to implement-
http://jelastic.com/docs/deploy-railo-to-jelastic
Thank you for your comment. I am sure that readers will find it very useful.