IIS7 CFML default document (Tomcat isapi_redirect)

340 views
Skip to first unread message

Jordan Michaels

unread,
Feb 1, 2010, 8:22:37 PM2/1/10
to ra...@googlegroups.com, ope...@googlegroups.com
I just wanted folks to know that I did get IIS7 to properly serve and
process index.cfm as the default document and I wanted to provide some
sort of documentation on how to do it.

I'm going to post the following message to both the OpenBD and Railo
mailing lists, since this fix is appropriate to both distributions, so I
apologize if you see this twice on both lists.

Lastly, I've ONLY tested this in IIS 7.5 on a Windows 7 64-bit VM, so
this method is very untested at the moment. I cannot say if there are
problems with it or not. I'd recommend testing it for yourself in a dev
environment before you try it on any production systems.

Here are the steps after you've done a basic install of the connector
via the Vivio Installer or otherwise:

1) IIS 7 Default Document

Set "index.cfm" as your IIS default document.

2) update workers.properties to include a default "ajp13" worker.

In the workers.properties file (located by default in
c:\[railo|openbd]\tomcat\conf folder), update the "worker.list"
attribute to include an "ajp13" worker. This is the default tomcat worker.

----begin example----
worker.list=railolb,jkstatus,ajp13
----end example----

Next define the attributes of the default worker to be a load balancer,
like the original openbd/railo worker.

----begin example----
# Define Default Worker
worker.ajp13.type=lb
worker.ajp13.balance_workers=ajp13w
----end example----

3) Make sure ISAPI DLL is executable

In IIS Manager, make sure the top-level server is selected, and click on
the "Handler Mappings" icon. From there, there should be an entry named
"ISAPI-dll". With the "ISAPI-dll" entry selected, click on the "Edit
Feature Permissions" link in the far right menu inside IIS. Click the
"Execute" check box if it isn't already checked.

4) Add ".cfm" handler mapping

Make sure the top level server is selected in the top left menu in IIS.
Click "Handler Mappings" in the main IIS window. In the far right menu,
click "Add Script Map". In the window that pops up, enter the following:

Request Path: "*.cfm"
Executable: "c:\[railo|openbd]\connector\isapi_redirect-[version].dll"
Name: "CFML" (can be whatever you want to label it)

When you hit "OK", IIS will prompt you to "Allow" this ISAPI extension.
Click "Yes". You should see your mapping show up in the "Handler
Mappings" list.

Repeat this process for *.cfc, *.jsp, or whatever... as you see fit.

5) Restart IIS, Restart Tomcat

Now test. Any errors? Check your
c:\[railo|openbd]\tomcat\logs\isapi_redirect.log file for the best
indicator as to what may be wrong.


I've gotten a *LOT* of questions about how to set up a CFML default
document for IIS, and until now, I haven't had a good answer.

Manual configs, like adding the "jakarta" directory and updating the
Tomcat "server.xml" file, will still need to be done for each new site.

It should also be mentioned that this will also work with JSP files, and
whatever else Tomcat is supposed to process. In searching for an answer
about this I found a lot of posts asking how to do this with "index.jsp"
files (among others) and there were no clear answers given to those
people that I could find. So... maybe this can also help folks who want
to set up index.jsp as their default document in IIS.

Let me know if you run into any problems and/or find solutions to those
problems.

Hope this helps!

--
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions

Reply all
Reply to author
Forward
0 new messages