0

我正在设置 AWS ELB 背后的 Spring Boot Admin。

配置是...

ELB(http, 80) --> 应用程序 (8080)

ELB(https, 443) --> 应用程序 (8080)

并且,ELB 健康检查有 /ping 端点。

我希望将每个 ELB http 请求重定向到 https。

我试过这个解决方案。

在 AWS ELB 后面使用嵌入式 Tomcat 的 Spring Boot - HTTPS 重定向

但它不起作用,因为这会重定向包括 /ping 在内的所有内容,而 ELB 无法进行健康检查。

我能做些什么?

4

1 回答 1

0

我认为,您可以在 httpd 级别进行操作。

转到您的 ssl.conf 文件

您可以在 /etc/httpd/conf.d 路径中找到在 Virtual Host 443 中添加以下内容

SSLProxyEngine  on

ProxyPass /ping/ http://127.0.0.1:8080/ping/ Keepalive=On

ProxyPassReverse /ping/ https://127.0.0.1:8080/ping/

ProxyPass / https://127.0.0.1:8080/ Keepalive=On

ProxyPassReverse / https://127.0.0.1:8080/
于 2017-07-20T09:29:21.100 回答