Tags

, , , ,

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

  1. Download Windows distribution
  2. Install to C:\railo
  3. Go to windows services and verify that Apache Tomcat Railo is running
  4. go to http://localhost:8888/index.cfm and the welcome to Railo should render
  5. <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>
  6. Use the Windows services control panel to stop Tomcat
  7. In your Windows hosts file (C:\Windows\System32\drivers\etc\hosts)
  8. create the entry:
    • 127.0.0.1          myapp # Tomcat uses the host name to identify the requested application.
  9. create the directory c:\railo\tomcat\myapp
  10. create \myapp\ROOT. (This is where you will keep your application’s .cfm files)
  11. create \myapp\ROOT\index.cfm with the contents <cfdump var= “#CGI#”>
  12. goto “C:\railo\tomcat\conf\Catalina\
    1. create the directory \myapp
    2. copy \localhost\manager.xml to \myapp and rename it to ROOT.xml
  13. Edit C:\railo\tomcat\conf\server.xml
    1. Find the <Engine></Engine> node and insert
    • <Host name=”myapp” appBase=”myapp”>
    • <Context path=”keyapt” docBase=”C:\railo\tomcat\myapp” />
  14. Restart Tomcat. You will see /myapp/WEB-INF and /myapp/ROOT/WEB- INF directories appear by magic.
  15. Browse to http://myapp:8888/index.cfm and you should see the cfdump (Update 2011 Mar 29 – corrected URL)
  16. 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.

Advertisement