有什么方法可以在 nginx 后面配置 jetty 但仅用于“活动内容”?

发布于 2024-12-25 21:30:21 字数 283 浏览 0 评论 0原文

我对 jetty 和 nginx 都是新手。它们看起来很轻且性能很高。但我想配置 nginx 仅当请求由 servlet 处理时才将请求传递到 jetty。让 nginx 处理那些 .jpg、.css、.js 等。

我可以使用resin/tomcat + Apache 做到这一点,但找不到nginx+jetty。

编辑我在nginx wiki中找到了这一点

I'm new to both jetty and nginx. They seem lightweight and high performance. But I would like to configure nginx to pass request to jetty only when those are handled by a servlet. Letting nginx deal with those .jpg, .css, .js, and so on.

I can do that with resin/tomcat + Apache but can't find it for nginx+jetty.

EDIT I found exactly this in nginx wiki

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

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

发布评论

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

评论(1

俯瞰星空 2025-01-01 21:30:22

stackoverflow 中的另一个问题可以给你一个设置 nginx 的方法。并且您为静态内容使用不同的路径:图像、js、css..

That another question in stackoverflow, could give you a way to setup nginx. And you use a different path for your static content: images, js, css..

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