【发布时间】:2018-06-15 13:31:12
【问题描述】:
我有一个基于球衣的 REST 应用程序,它在 grizzly 上运行,并在 apache 反向代理后面配置如下
例如www.example.com/base/json/helloworld/get 应该重定向到我的 REST 服务。 (多种资源)。但是,当我尝试在浏览器中打开 url 时,总是找不到资源。
在我的 apache 配置中:
ProxyPass /base/ http://localhost:8123/
ProxyPassReverse /base/ "http://localhost:8123/
我的 grizzly 服务器配置非常简单,如果我发出 curl 请求就可以工作: curl localhost:8123/base/json/helloworld/get => 响应正确。
但是,如果我在浏览器中访问 url,例如
example.com/base/json/helloworld 我收到了灰熊错误:
路径 /json/helloworld/get' 标识的资源不存在。
HttpServer server = GrizzlyHttpServerFactory.createHttpServer(URI.create(http://localhost:8123/base), resourceConfig, false);
我错过了什么吗?我已经尝试将 url 更改为域等,但我无法理解为什么它不起作用。
【问题讨论】:
标签: apache reverse-proxy jersey-2.0 grizzly