0

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?

Community
  • 1
  • 1
chaeyk
  • 491
  • 1
  • 8
  • 20

1 Answers1

0

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/
  • Thanks. But I don't use httpd. ELB connects to spring directly. – chaeyk Jul 21 '17 at 00:27
  • You can download httpd, ELB communicates with httpd because you are creating Virtual Host for port 443, then you can do port forwarding or redirect the url's as in your case – Karthik Tsaliki Jul 21 '17 at 06:07