Railo / Apache / Tomcat / Mura CMS/ SES URL Gotcha

Jul 09, 2009

Another catchy title :) I've been trying for a day or two to get SES Urls working on Tomcat/Railo/Apache/Mura; Specifically, I'm thinking of the /index.cfm/something/ style syntax. Having installed Mura, I couldn't get any of the actual pages past the front page to work. I got an Apache 404 error. Sean Corfield's Blog gave me a good starting point. As I'd installed Railo via the Beta install script, my config was a little different to some which is what gave me the headache. Firstly, I had to get Tomcat to receive the requests, as Apache was serving me the 404s; In my Apache httpd.conf file, I had the following at the bottom:

JkMount /*.cfm ajp13 JkMount /*.cfc ajp13 JkMount /*.do ajp13 JkMount /*.jsp ajp13 JkMount /*.cfchart ajp13 JkMountCopy all JkLogFile /var/log/httpd/mod_jk.log

Note, the *.cfm entry - this needs changing to:

JkMount /*.cfm* ajp13

This means apache matched the correct syntax to pass the request to Tomcat.

So at that point, I was getting 404's served by Tomcat rather than Apache; at least they were getting to the correct place.

For me, my Tomcat install lives in /opt/railo/tomcat/, so I found the web.xml file in /opt/railo/tomcat/conf/ and changed added a servlet mapping:

 

CFMLServlet /index.cfm/*

And then tried again with Mura. No joy - still 404's in Tomcat; Having re-read Sean's entry, it turns out you have to specify if you want the pattern to match a directory;

So the servlet mapping I'd put up would match /index.cfm/*, but not, as Mura users know, the default Mura behaviour of /default/index.cfm/*

Changing to:

CFMLServlet /default/index.cfm/*

Sorts it.

 

I know there's a jar file supplied by Mura to fix this - but with my seemingly different Tomcat config, I could work out how to get it working properly.

Next stage is going to have to be to get the URL rewriting working to get proper URLs like /about-us/, rather than /default/index.cfm/about-us/.

Comments

Tony Garcia

Tony Garcia wrote on 07/09/09 9:09 PM

There's already a post in the Mura blog which describes how to remove the siteID from the URL:
http://www.getmura.com/index.cfm/blog/removing-the-siteid-from-urls-in-mura/
scott

scott wrote on 06/07/10 11:48 PM

I know this post is a bit old but
CFMLServlet /SiteID/index.cfm/*
still seems to be the only solution I can come up with. Anyone ever find a cleaner solution?

I'd hope CFMLServlet /*/index.cfm/* would work but no luck.

Write your comment



(it will not be displayed)