简体   繁体   English

Tomcat AJP 请求到普通 HTTP

[英]Tomcat AJP request to normal HTTP

I have a company application deployed on Tomcat 8 and another application making request to an Apache server that uses AJP ` protocol to access the application.我在 Tomcat 8 上部署了一个公司应用程序,另一个应用程序向使用 AJP` 协议访问该应用程序的 Apache 服务器发出请求。 I am new to AJP.我是 AJP 的新手。 I have created an AWS infrastructure using containers with the mentioned application (as an alternative to the described above).我已经使用容器和上述应用程序创建了一个 AWS 基础设施(作为上述应用程序的替代方案)。 The problem is I want to avoid using Apache and use Amazon's ALB (application load balancer) and so far it's working, except the AJP request.问题是我想避免使用 Apache 并使用 Amazon 的 ALB(应用程序负载均衡器),到目前为止它正在工作,除了 AJP 请求。 The problem I am having is that when not using Apache, I do not need to use AJP anymore and I want to replace it with HTTPS.我遇到的问题是,当不使用 Apache 时,我不再需要使用 AJP,我想用 HTTPS 替换它。 Will enabling the HTTPS connector in Tomcat do the trick?在 Tomcat 中启用 HTTPS 连接器会成功吗? The lines in Apache configuration are: Apache 配置中的行是:

ProxyPass               /pmaddon-a  ajp://*.*.*.*:8009/pmaddon-a
ProxyPassReverse        /pmaddon-a  ajp://*.*.*.*:8009/pmaddon-a

To sum up, if I skip the Apache server and call Tomcat directly with HTTPS (with enabled HTTPS connector of course) will it have the same result as using the AJP connector as I am now?总结一下,如果我跳过 Apache 服务器并直接使用 HTTPS 调用 Tomcat(当然是启用了 HTTPS 连接器),它是否会像我现在一样使用 AJP 连接器获得相同的结果?

I understand what you want to do is:我明白你想做的是:

  • Access you application directly using the TOMCAT connector使用 TOMCAT 连接器直接访问您的应用程序
  • Remove the APACHE in front and its AJP communication with TOMCAT去掉前面的APACHE及其与TOMCAT的AJP通信

This is possible to do, perhaps you need to adapt that other application (the one that calls apache) to point to the URL that arrives to the TOMCAT connector.这是可能的,也许您需要调整其他应用程序(调用 apache 的应用程序)以指向到达 TOMCAT 连接器的 URL。

If the question is if you will have the same result:如果问题是您是否会得到相同的结果:

I understand yes.我明白是的。 AJP and HTTP both serve the same content, it's just a different protocol. AJP 和 HTTP 都提供相同的内容,只是不同的协议。

You didnt explain if you have HA therefore I did not enter that topic.你没有解释你是否有 HA 所以我没有进入那个话题。

AJP is very similar to http/https except it is a binary protocol from Apache (Apache Jserv Protocol) but it is better performant since it size is almost 1/5 of the http/https. AJP 与 http/https 非常相似,只是它是来自 Apache(Apache Jserv 协议)的二进制协议,但它的性能更好,因为它的大小几乎是 http/https 的 1/5。 It is widely being used with reverse proxy web server where webserver talk to application server using AJB.它广泛用于反向代理 Web 服务器,其中 Web 服务器使用 AJB 与应用程序服务器通信。

You don't need to stick with AJP if you are directly connecting to Tomcat connector如果您直接连接到 Tomcat 连接器,则无需坚持使用 AJP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM