CFWheels, OSX Lion Apache, Tomcat and Railo
Recently I got a new Macbook pro, hence this post as it took me a while to get a reliable way of getting the connectors and CFWheels URL rewriting in partial,off and on modes (Different sites to differing requirements).
For my install I followed the get railo instructions down till “Connect Tomcat To Apache” which I could not for the life of me get to work. Then I mucked around with the many other resources you will find by doing a quick google then using the information from the railodeveloper link I came up with the following solution.
Connecting Tomcat To Railo.
An exact lift from the railodeveloper.com link under the title of “Use mod_proxy if you have Apache 2.2 or later” (I discovered OSX lion has Apache 2.2.4). Note that you do this EXACTLY, including especially the localhost:8009 – this is the port that the ajp connector runs on, it’s where Tomcat and apache talk AFAIK.
Now you should have normal coldfusion functions working handily! (Multiple hosts as set up by method 2 here: http://www.railodeveloper.com/post.cfm/investigation-on-auto-configuring-apache-vhosts-in-tomcat-for-use-with-railo#option2).
Activating CFWheels URL Rewriting For individual sites.
Here’s the code for my “contestate” site that has full URL rewriting on it, but also allows for partial URL rewriting:
Lastly you have to add a mapping in the tomcat web.xml file for the index.cfm/ redirects as follows:
<servlet-mapping> <servlet-name>GlobalCFMLServlet</servlet-name> <url-pattern>/index.cfm/*</url-pattern> </servlet-mapping>
That’s all, any questions post in the comments, or if you found a better way I’d be happy to know!