【发布时间】:2012-07-03 05:31:50
【问题描述】:
我们的实时设置使用 IIS 和虚拟目录来访问存储在另一台服务器上的图像或 pdf 等内容。我们正在尝试使用 CF9 开发版的内置网络服务器来设置类似的东西。
到目前为止,我可以成功地使用 cfdirectory 转储远程源上的文件,我必须像我一样让 CF9 应用服务器登录。
我可以将文件夹从远程服务器复制到我的本地 PC 并添加一个虚拟映射条目到 jrun-web.xml 并且工作正常,尽管这不适合我们的目的。
<virtual-mapping>
<resource-path>/login/images/directory/*</resource-path>
<system-path>C:/Users/[MyUserName]/Desktop/directory</system-path>
</virtual-mapping>
但是我无法直接映射到该远程服务器。 我试过了
<virtual-mapping>
<resource-path>/login/images/directory/*</resource-path>
<system-path>\\[remoteServer]\images\directory</system-path>
</virtual-mapping>
还有
<virtual-mapping>
<resource-path>/login/images/directory/*</resource-path>
<system-path>//[remoteServer]/images/directory</system-path>
</virtual-mapping>
我尝试映射网络驱动器
<virtual-mapping>
<resource-path>/login/images/directory/*</resource-path>
<system-path>Z:/images/directory</system-path>
</virtual-mapping>
所有这些都会导致 /login/images/directory/ 中的任何内容出现 404
【问题讨论】:
-
你为什么不在本地使用 IIS?
-
没有真正的原因,但我
THOUGHT使用内置的网络服务器会更容易。 -
+1 在本地使用 IIS 或 Apache。你会有更多的选择,当然会有更多的人可以帮助你:)
标签: coldfusion coldfusion-9 jrun