【发布时间】:2022-01-21 00:53:17
【问题描述】:
在 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 设置了默认文档。我们还将<welcome-file-list> 设置为在我们的应用程序服务器(web.xml)上包含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>
【问题讨论】:
-
再澄清一下,Adobe 对此设置的术语是“分布式模式”。当有一个 Web 服务器和另一个不同的 ColdFusion 服务器时。
-
我不知道为什么人们不赞成这个问题,尤其是在这么长时间之后。您能否发表评论,说明您为什么投反对票?
标签: coldfusion jrun