0

I am running a Docker container through ECS. The container runs an Apache server hosting a simple web application. However, the server requires LDAP authentication to access the page.

I am using a Service configured with an ELB to manage the distribution across ECS. I am running into a problem where the health check is failing for all instances. From local testing I know that the Docker container/server works.

AWS ELB Health Check docs state that a 200 OK response is required to pass the health check (my ping path is /index.html). However, LDAP authentication failure will return 401 Authorization Required.

How to I get the health check to pass without disabling LDAP?

This question on StackOverflow suggests just switching the health check to a TCP health check, though that doesn't feel right. Happy to do it if it's the correct way to handle this situation.

Matthew Herbst
  • 167
  • 1
  • 7

1 Answers1

1

Do you have an 'unprotected' page? Like a login page?

If so, then you could use this page as the ELB health check.

If not, can you add a simple page (ping.html) which does not require LDAP authentication?

Daniel Scott
  • 430
  • 3
  • 11
  • That's a good idea, I can add such a page. I'll keep the question open for a little bit since I am curious to know if there is a way without doing that. – Matthew Herbst Apr 20 '16 at 08:27
  • And apparently [I should have looked harder on SO](http://stackoverflow.com/questions/23921370/aws-load-balancer-with-no-health-check-or-make-it-work-with-non-200-response) before asking :) – Matthew Herbst Apr 20 '16 at 08:33