How to instruct ELS AWS to consider a health check that returns 403 as successful?

I have a Jenkins CI server in a private VPC EC2 subnet, and in order to make it accessible from the outside world, I configured ELB (which also processes the HTTPS security certificate using IAM, but this is just the rationale for why I am doing this, and not accessing one instance directly).

The Jenkins server is configured for authentication, so when ELB performs its health check as an anonymous user, it receives a restricted page with 403 access, which should be fine, but understood as an error, and this flag is marked as not working.

Is there any way to get ELB to treat 403 response as OK response? Or maybe there is a page in Jenkins that always returns a 200 status code?

+4
source share
2 answers

If you are performing an HTTP health check, she needs a 200 response. You can switch this to a tcp health check, which may not be as accurate, but it does not care about the status code.

+9
source

The check you are looking for is / login instead of /

This way you can save the http check.

+11
source

Source: https://habr.com/ru/post/1540798/


All Articles