1

在 JRun(J2EE 安装)、Windows Server 2008 R2、Java 1.6.0_22 上运行 ColdFusion 9,0,1,274733

是否有其他人在获取默认文档index.cfm以使用 ColdFusion 时遇到问题?我假设这只是我们设置的一个问题;不同的 Web 服务器 (IIS) 和应用程序服务器 (ColdFusion)。我无法想象我们是唯一运行此配置的人。我们是吗?

所以这就是问题所在。
如果我们请求http://mysite.com/index.cfm它可以工作。
如果我们请求http://mysite.com/它不起作用,我们会得到 404。

我在我们的 IIS 服务器上检查了 Web 连接器的日志文件,可以看到它正在向我们的 ColdFusion 服务器发送请求。ColdFusion 服务器正在发回 404 错误代码,但我不知道为什么。我们在 IIS 服务器上为index.cfm. 我们的应用程序服务器 (web.xml) 中也包含该<welcome-file-list>集合。index.cfm

当我们不包括时,从我们的网络连接器日志中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/.

当我们包含以下内容时,从我们的网络连接器日志中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 ...

我们通过使用 IIS 中的 URL 重写模块附加index.cfm到 URL 来解决这个问题。它有效,但我的直觉一直告诉我,我们不应该为这样的基本功能这样做。

还有其他人有这个问题吗?你是怎么解决这个问题的?

编辑添加更多信息

这是来自 IIS 服务器的我网站的 web.config 文件内容:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <handlers>
        <add name="JWildCardHandler" path="*" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\1\jrun_iis6_wildcard.dll" resourceType="Unspecified" requireAccess="None" />
        <add name="hbmxmlHandler" path="*.hbmxml" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfswfHandler" path="*.cfswf" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfrHandler" path="*.cfr" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfcHandler" path="*.cfc" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfmlHandler" path="*.cfml" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="cfmHandler" path="*.cfm" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="jwsHandler" path="*.jws" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
        <add name="jspHandler" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="D:\JRun4\lib\wsconfig\jrun_iis6.dll" resourceType="Either" responseBufferLimit="0" />
    </handlers>
    <defaultDocument>
        <files>
            <add value="index.cfm" />
        </files>
    </defaultDocument>
    <staticContent>
        <mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package zip" />
    </staticContent>
</system.webServer>
</configuration>

以下是APP服务器web.xml中的部分文件内容:

<welcome-file-list id="WelcomeFileList_1034546870672">
    <welcome-file>index.cfm</welcome-file>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
</welcome-file-list>
4

4 回答 4

1

在 IIS 管理器中尝试为您的网站添加默认文档“index.cfm”。

于 2012-11-01T19:25:17.303 回答
0

我还在 Adob​​e 论坛上发布了这个问题,它在那里获得了更多的关注。 您可以在此处阅读所有详细信息。

我遇到的主要问题似乎是,一旦确定 ColdFusion 没有“/”映射,IIS 就没有将“/index.cfm”传递给 Web 连接器。这在我在 Web 服务器上创建了一个空白(空)index.cfm 文件后开始工作。我不记得过去在使用分布式模式时必须将 CFM 文件放在 Web 服务器上。任何人都可以确认或否认 CFM 文件需要驻留在两台服务器上才能正常工作(无论如何都不使用重写规则)?

于 2012-11-05T22:01:29.620 回答
0

我参加这个聚会有点晚了,但是我一直在开发一个系统,我需要在同一个开发服务器上频繁地在 CF8 和 CF10 之间切换,所以我一直在处理要运行的批处理文件wsconfig 以节省一些精力,我遇到了同样的问题。CF 工作正常,但从不处理 / 的 index.cfm - 如上所述,所有映射似乎都设置正确。

我发现如果您将每个站点添加我的名字而不是使用“-site 0”,wsconfig 会更可靠地工作

因此,例如,手动删除并重新安装在 IIS 上运行的两个站点的连接器

set CFUSION_HOME=C:\ColdFusion10\cfusion
%CFUSION_HOME%\runtime\bin\wsconfig -uninstall 
net start "ColdFusion 10 Application Server"
%CFUSION_HOME%\runtime\bin\wsconfig -ws IIS -site "Default Web Site"
%CFUSION_HOME%\runtime\bin\wsconfig -ws IIS -site "My Website Name"
于 2014-09-24T08:07:00.270 回答
0

在将 CF 从 2016 升级到 2018 / 2021 后,我遇到了同样的问题。解决方案是:打开 IIS 管理器并转到 Handler Mappings。在这里,搜索 cfcHandler、cfmHandler、cfmlHandler 条目并右键单击、编辑它们,您可能会看到如下内容:C:\ColdFusion2021\config\wsconfig\1\isapi_redirect.dll

确保将路径更新为 ColdFusion 服务器的当前版本。就我而言,即使我更新到 2021,它仍在尝试访问 ColdFusion2016 文件夹。

这为我解决了这个问题。

于 2022-01-20T16:53:17.587 回答