运行ColdFusion 9,0,1,274733在JRun (J2EE安装)、Windows 2008 R2、Java1.6.0_22上
是否还有其他人在使用默认文档index.cfm
时遇到了问题?我假设这只是一个问题,因为我们的设置;不同的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
**:** 时,从web连接器的日志中提取
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>
下面是应用服务器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>
发布于 2012-11-05 22:01:29
我还在Adobe论坛上发布了这个问题,在那里得到了更多的支持。你可以在这里阅读所有的细节。
我遇到的主要问题似乎是,一旦确定ColdFusion没有“/”映射,IIS就不会将'/index.cfm‘传递给web连接器。在我在web服务器上创建了一个空白(空的) index.cfm文件之后,它就开始工作了。我不记得在过去使用分布式模式时必须将CFM文件放在web服务器上。有人能确认或否认CFM文件需要驻留在这两个服务器上才能正常工作(反正不使用重写规则)吗?
发布于 2012-11-01 19:25:17
在IIS中,尝试为您的网站添加一个默认文档"index.cfm“。
发布于 2014-09-24 08:07:00
我在这个问题上有点晚了,但是我一直在开发一个系统,在这个系统中,我需要频繁地在同一个dev服务器上的CF8和CF10之间切换,所以我一直在处理一个批处理文件来运行wsconfig以节省一些精力,我遇到了同样的问题。CF工作得很好,但从不处理/--如上所述,所有映射似乎都已正确设置。
我发现,如果您添加每个站点我的名称,而不是使用"-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"
https://stackoverflow.com/questions/13182807
复制相似问题