在 JBoss 中部署 ColdFusion — 获取正确的根路径
我们正在 JBoss 服务器上部署多个 ColdFusion 9 实例(每个虚拟主机一个),但我无法从 ColdFusion 的内部功能返回正确的路径。具体来说,上下文似乎根植于两个目录太高了。例如,如果我们执行类似 #CGI.SCRIPT_NAME# 的操作,之前我们会得到“index.cfm”,但自从迁移到 JBoss 后,我们会得到“foo.bar.edu/htdocs/index.cfm”。
有人告诉我这是一个棘手的问题,但我觉得很难相信。我正在研究 jboss-web.xml 文件的参数,但我还没有确定它应该是什么。有人有这方面的经验吗?
我尝试过 CF 映射,但这不起作用,因为路径中有句点,而 CF 不会接受。似乎应该有一个简单的方法来处理这个问题。
我们使用 JBoss 5、Apache 2.2。
谢谢!
We're deploying multiple ColdFusion 9 instances (one per virtual host) on a JBoss server and I'm having trouble getting the correct path back from ColdFusion's internal functions. Specifically, the context seems to be rooted two directories too high. For example, if we do something like #CGI.SCRIPT_NAME#, we'd get "index.cfm" previously, but since moving to JBoss, we get "foo.bar.edu/htdocs/index.cfm".
I've been told that this is an intractable problem, but I find that hard to believe. I'm looking into the jboss-web.xml file's parameter, but I haven't yet determined what that should be. Anyone have experience with this?
I've tried a CF mapping, but that doesn't work because the path has periods in it, which CF won't accept. Seems there should be a simple way to handle this.
We're using JBoss 5, Apache 2.2.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 Apache IS 的 HTTP 代理将更改一些 CGI 变量。这是事实。
使用 AJP 可以解决大多数上述问题,但仍然有一些问题会陷入代理中,如果您使用上下文根,则更是如此。
HTTP proxying using Apache IS going to change some of the CGI variables. It's a fact.
Using AJP instead will fix most of said issues but there's still a few that get caught up in the proxy, and if you are using a context root then even more so.