Jetty:挂载到不同主机上的目录

发布于 2024-07-26 11:16:04 字数 706 浏览 3 评论 0原文

我希望在本地工作时使用 Jetty/Maven 映射到不同主机上的目录。 我发现你可以使用 mod_jk (JkMount/JkUnMount) 使用 Apache 来完成此操作,但还没有弄清楚如何在 jetty 上执行相同的操作。

在我们的 dev/q/live 服务器上,我们在 JBoss 前面安装了 Apache,并使用 mod_jk 来执行此操作。 在本地,我们使用 jetty

为了让您了解我在说什么,您可以通过以下方式配置 Apache 来完成此操作:

在 httpd.conf 中:

JkMount /images/* host2

JkMount /* host2

JkUnMount /images/ * 主机1的

worker.properties:worker.list=host2

,主机

1worker.host2.host=host-2.theDomain.comworker.host2.port

=46654worker.host1.host

=host-1.theDomain.comworker.host1

。 port=46655

有没有办法配置 Jetty 来做同样的事情?

顺便说一句,在本地,我正在使用 Eclipse 的 Maven 插件,如果这有什么区别的话。

谢谢!

I'm looking to map to a directory on a different host using Jetty/Maven when working locally. I've found you can do this w/ Apache using mod_jk (JkMount/JkUnMount), but haven't figured it how to do the same on jetty.

On our dev/q/live servers, we have Apache in front of JBoss and use mod_jk to do this. Locally, we're using jetty

To give you an idea of what I'm talking about, this is how you would configure Apache to accomplish this:

in httpd.conf:

JkMount /images/* host2

JkMount /* host2

JkUnMount /images/* host1

workers.properties:

worker.list=host2,host1

worker.host2.host=host-2.theDomain.com

worker.host2.port=46654

worker.host1.host=host-1.theDomain.com

worker.host1.port=46655

Is there a way to configure Jetty to do the same thing?

Btw, locally, I'm using the Maven plugin for Eclipse if that makes a difference.

thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千纸鹤 2024-08-02 11:16:04

更新:


我在这里尝试了不同的路线,只是添加了一个文件夹,然后“高级”>“ 链接到文件系统中的一个文件夹,我指向远程服务器上的一个文件(我相信我们使用 WebDav)。 这些文件显示在项目资源管理器中,但不提供服务。 我将尝试将 org.mortbay.util.FileResource.checkAliases 设置为 true,如下所示:

http://docs.codehaus.org/display/JETTY/How+to+enable+serving+aliased+files

...会让您知道是否需要注意它的。

Update:


I tried going a different route here and just added a folder, then Advanced > Link to a folder in the file system and I pointed to a file on the remote server (I believe we use WebDav). The files show up in project explorer, but they aren't served. I'm going to try setting org.mortbay.util.FileResource.checkAliases to true as specified here:

http://docs.codehaus.org/display/JETTY/How+to+enable+serving+aliased+files

...will let you know if that takes care of it.

始于初秋 2024-08-02 11:16:04

您使用 Spring 框架吗? 如果是这样,这里的另一个解决方案是使用 tuckey urlrewrite。 您可以测试您的本地域并仅在那里运行规则。

http://www.tuckey.org/urlrewrite/manual/3.0/introduction.html

Are you using the Spring Framework? If so, another solution here is to use tuckey urlrewrite. You can test for your local domain and only run the rules there.

http://www.tuckey.org/urlrewrite/manual/3.0/introduction.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文