[英]SSL to AWS ELB and ELB to Tomcat non SSL / HTTP
I have configured an AWS ELB with 443 HTTPS port to support Https incoming request.我已经配置了一个带有 443 HTTPS 端口的 AWS ELB 来支持 Https 传入请求。 However, from ELB I want to point to a target EC2 which has a tomcat server running on port 80 without any SSL configuration.
但是,我想从 ELB 指向一个目标 EC2,它有一个在端口 80 上运行的 tomcat 服务器,没有任何 SSL 配置。
I don't want to configure SSL at Tomcat level我不想在 Tomcat 级别配置 SSL
My listener is pointing to a target EC2(running tomcat) on port 80我的侦听器指向端口 80 上的目标 EC2(运行 tomcat)
I am getting 503 Bad Gateway error我收到 503 Bad Gateway 错误
I have tried following configuration at server.xml我已尝试在 server.xml 中进行以下配置
(1) (1)
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
(2) (2)
<Connector
port="80"
protocol="HTTP/1.1"
proxyPort="443"
scheme="https"
secure="true"
proxyName="example.com"
connectionTimeout="20000"
URIEncoding="UTF-8"
redirectPort="8443" />
Is this possible?这可能吗?
After trying versions options I have got the solution.尝试版本选项后,我得到了解决方案。
(1) Yes, it is possible to have https at ELB level and EC2 tomcat running on normal http port 80 (1) 是的,可以有ELB级别的https,EC2 tomcat运行在正常的http端口80
(2) A mistake I was doing is that, I was creating a target with 443 port. (2) 我犯的一个错误是,我创建了一个带有 443 端口的目标。 I should create a target which is pointing to 80 port
我应该创建一个指向 80 端口的目标
(3) Create a listener at Load Balance level and map target which is pointing to port 80 (3) 在 Load Balance 级别创建一个侦听器并映射指向端口 80 的目标
With this steps, I have resolved my issue.通过这些步骤,我已经解决了我的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.