Skip to main content
Miguel-F
Inspiring
November 1, 2012
Question

Default document not being processed when not included in URL

  • November 1, 2012
  • 2 replies
  • 22818 views

Running ColdFusion 9,0,1,274733 on JRun (J2EE install), Windows Server 2008 R2, Java 1.6.0_22

Has anyone else had a problem getting the default document, index.cfm, to work with ColdFusion? I'm assuming that this is only an issue because of our setup; different web server (IIS) and application server (ColdFusion). I can't imagine we are the only ones running this configuration. Are we?

So here is the issue.

If we request http://mysite.com/test/index.cfm it works.

If we request http://mysite.com/test/ it does not work and we get a 404.

I checked the web connector's log file on our IIS server and can see that it is sending the request to our ColdFusion server. The ColdFusion server is sending back the 404 error code but I can't figure out why. We have the default document set on our IIS server for index.cfm. We also have the <welcome-file-list> set to include index.cfm on our application server (web.xml).

From our web connector's log when we do NOT include index.cfm:

2012-11-01 13:37:22 jrISAPI[4544:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/"

2012-11-01 13:37:22 jrISAPI[4544:3600]     HTTP_HOST: servername

2012-11-01 13:37:22 jrISAPI[4544:3600]  filtering /test/ (/test/) HOST=servername

2012-11-01 13:37:22 jrISAPI[4544:3600]  filterRequest:   no match

2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl: request received: URL=/test/

2012-11-01 13:37:22 jrISAPI[4544:3600]  ExecUrl Completion: 404, ErrorCode=2, URL=/test/.

From our web connector's log when we do include index.cfm:

2012-11-01 13:49:02 jrISAPI[9936:3600]  ***HttpExtensionProc for JRun ISAPI Extension: uri is "/test/index.cfm"

2012-11-01 13:49:02 jrISAPI[9936:3600]     HTTP_HOST: servername

2012-11-01 13:49:02 jrISAPI[9936:3600]  filtering /test/index.cfm (/test/index.cfm) HOST=servername

2012-11-01 13:49:02 jrISAPI[9936:3600]  filterRequest:   matched *.cfm

2012-11-01 13:49:02 jrISAPI[9936:3600]  ***IISWorkerThreadProc for JRun ISAPI Extension: uri is "/test/index.cfm"

2012-11-01 13:49:02 jrISAPI[9936:3600]     ALL_RAW: Connection: Keep-Alive Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, application (553)

2012-11-01 13:49:02 jrISAPI[9936:3600]  Headers and Values:

... and much more ...

We have gotten around this issue by using the URL Rewrite module in IIS to append index.cfm to the URL. It works but my gut keeps telling me that we should not need to do that for such basic functionality.

Is anyone else having this issue? How have you gotten around this?

This topic has been closed for replies.

2 replies

Charlie Arehart
Community Expert
Community Expert
November 1, 2012

First, Miguel, by “ColdFusion on JRun (J2EE install)”, do you really mean you deployed a CF WAR on JRun? Or do you mean you chose the Multiserver form of deployment of CF, which does also deploy CF on JRun (but not as a WAR)? May not be critical, but since you wonder about how unusual your setup may be, it seems worth clarifying.

In fact, you go on to say you wonder if it’s “only an issue because of our setup; different web server (IIS) and application server (ColdFusion)”, but nearly everyone runs CF with a web server separate from CF. You don’t mean the web server is on one box and CF is on another (what has traditionally been called “distributed CF”), do you? If so, that would be unusual, but is indeed still supported (if horribly documented).

Back to the default document, I see you saying you set the default document in IIS, but doesn’t the log suggest it was NOT being passed in from IIS to CF?

Is it possible that you have it set in a web site other than that which this request is going through? If you may say “no”, here’s something else to consider: if this is IIS 7, running in native (not IIS 6 compatibility) mode, did you realize that settings made in IIS are saved to a web.config file in the docroot? I’ve seen people get in trouble when they have 2 sites sharing the same docroot, and someone changes settings in one site, not realizing that that causes changes to the other site (literally, you would see it reflected in the IIS interface). So do check to make absolutely sure that index.cfm is in the docroot (just before you make the test request).

Also, since you mention using rewrite rules, is it not possible that one of those rules is getting in the way? Try disabling that functionality for a moment and retry the test request.

Finally, here’s an outside the box thought: are you absolutely positive that the request you’re making is going through that site? You could have a request being unexpectedly handled by a site other than what you think. It’s possible, but I realize not likely.

Hope that helps some. If not, just say so and perhaps others will have more ideas.

/charlie

/Charlie (troubleshooter, carehart. org)
Miguel-F
Miguel-FAuthor
Inspiring
November 1, 2012

Charlie Arehart wrote:

First, Miguel, by “ColdFusion on JRun (J2EE install)”, do you really mean you deployed a CF WAR on JRun? Or do you mean you chose the Multiserver form of deployment of CF, which does also deploy CF on JRun (but not as a WAR)? May not be critical, but since you wonder about how unusual your setup may be, it seems worth clarifying.

I mean that I chose the multiserver installation option.

In fact, you go on to say you wonder if it’s “only an issue because of our setup; different web server (IIS) and application server (ColdFusion)”, but nearly everyone runs CF with a web server separate from CF. You don’t mean the web server is on one box and CF is on another (what has traditionally been called “distributed CF”), do you? If so, that would be unusual, but is indeed still supported (if horribly documented).

Yes that is what I mean.  IIS is on one box and CF is on a different box.

Back to the default document, I see you saying you set the default document in IIS, but doesn’t the log suggest it was NOT being passed in from IIS to CF?

The log does suggest that but the setting is made in IIS. I'm not sure what that request looks when it works.  There is also a default document on the CF side (welcome-file-list) which I have also set.


Is it possible that you have it set in a web site other than that which this request is going through? If you may say “no”, here’s something else to consider: if this is IIS 7, running in native (not IIS 6 compatibility) mode, did you realize that settings made in IIS are saved to a web.config file in the docroot?

We are running IIS 7.5 I believe (will check when I get back to office tomorrow).  We are not running IIS 6 compatibility mode.  And yes I am aware of the web.config files and have checked the one for this website (the only website on the server).  It appears to be okay.

I’ve seen people get in trouble when they have 2 sites sharing the same docroot, and someone changes settings in one site, not realizing that that causes changes to the other site (literally, you would see it reflected in the IIS interface). So do check to make absolutely sure that index.cfm is in the docroot (just before you make the test request).

Also, since you mention using rewrite rules, is it not possible that one of those rules is getting in the way? Try disabling that functionality for a moment and retry the test request.

I have disabled the rewrite rules for this test.  With the rewrite rules it works.  It just seems like that should not be necessary.

Finally, here’s an outside the box thought: are you absolutely positive that the request you’re making is going through that site? You could have a request being unexpectedly handled by a site other than what you think. It’s possible, but I realize not likely.

I have verified that the request is hitting the web server and actually hitting the ColdFusion server too.  Those are the log excerpts that I included.

Hope that helps some. If not, just say so and perhaps others will have more ideas.

It does help and makes me verify my thinking/settings. Thanks for the input.

/charlie

Charlie Arehart
Community Expert
Community Expert
November 1, 2012

Thanks for the clarifications, Miguel.

- So to be clear, you don’t want to say you’re doing a “J2EE install”, for future reference. That is very different from multiserver (there are 3 choices on CF install: server, multiserver, and J2EE). I do appreciate that technically the multiserver deployment is an install on a J2EE server (JRun), but then so technically is server (it’s just more hidden). If you were doing that third, WAR/EAR deployment, that would indeed be far less typical than most do.

- As for doing distributed mode, ok that’s interesting. That is also indeed atypical. But I don’t think it should affect this issue. I’ve never done it, though, so I can’t say for sure.

- As for the default document/welcome-file-list in CF, that’s for use with the built-in web server, so should have no bearing in this discussion. (Again, I understand that it would not be clear on the surface)

Now let’s move on to more practical matters:

- You say, “I have disabled the rewrite rules for this test. With the rewrite rules it works. It just seems like that should not be necessary.” Did you really mean to say “without the rewrite rules it works?? If so, then what “should not be necessary”? It would seem the rewrite rules could then explain what’s happening, if they are somehow passing the request on to CF before IIS would detect that it was missing a default document. (You may want to explore the modules/filters/other pages in IIS where there is an option to change the ordering of things. Maybe something is handling the request before the default document processing happens.)

Finally:

- I had asked, “are you absolutely positive that the request you’re making is going through that site”. Your answer to that seemed to suggest you thought I was asking something else. But bottom line, in that you said (earlier in your note) that you have only the one web site, that rules out my point there.

Hope something clicks for you.

/charlie

/Charlie (troubleshooter, carehart. org)
WolfShade
Legend
November 1, 2012

If you are using IIS, index.cfm is not in there by default.  You have to add it to the default documents list.  I don't have instructions, for that, but it's easily googled.

Never mind.. didn't read the whole post. 

^_^