Coldfusion and Apache won’t default execute index.cfm?

Ran into this today, strange setup but I’m running Coldfusion 9 with Apache (WAMP Server) 2.2.11. The short story is that I installed and configured CF just fine, but when it came time to execute CFML pages, nothing would happen unless I put the name of the file at the end of the URL? So in the case of index.cfm, I had to actually type that on the end of the URL?

Initially I figured I forgot to add index.cfm to the DirectoryIndex in httpd.conf. I did that and restarted apache and still no execution of index.cfm?? After googling a bit and finding nothing, I examined the only other portion of apache I thought could be responsible. The spot where JRun gets loaded as an Apache module. Sure enough, the following line was at the bottom:

AddHandler jrun-handler .jsp .jws

It was obvious I needed to add .cfm to that list in order to have Apache pass any CFML page along to the module for execution by Coldfusion. So I made the following change:

AddHandler jrun-handler .jsp .jws .cfm

After that, Apache happily referred index.cfm to JRun for processing. Why the installer didn’t get that setup correctly in the first place I don’t know. The Web Server Configuration Tool said everything was great when I set the server up. Something to watch for and hopefully not waste too much time with next time.

No Comment

No comments yet

Leave a reply