0
votes

I'm setting up Spring Boot Admin which is behind AWS ELB.

Configuration is...

ELB(http, 80) --> Application (8080)

ELB(https, 443) --> Application (8080)

And, there is /ping endpoint for ELB health check.

I want every ELB http request to be redirected to https.

I tried this solution.

Spring Boot with Embedded Tomcat behind AWS ELB - HTTPS redirect

But it didn't work, because this redirects every thing include /ping, and ELB can't do health check.

What can I do?

1

1 Answers

0
votes

I think, You can do at the httpd level.

Go to your ssl.conf file

You can find in /etc/httpd/conf.d path Add the following in 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/