- Newest
- Most votes
- Most comments
Hello.
It's strange that health check access is being redirected in the first place.
First of all, I think it would be better to prevent health check access from being redirected.
Is there a setting in Nginx settings to redirect when accessing the ALB health check path?
Do not use http to https redirect on ngnix. If you want to redirect http to https, create a 2nd listener on the ALB on port 80 and perform the redirect here. There isnt a need to perform this on NGINX. I would remove that
Thank you Gary for looking into my issue. I just removed the redirect. I tried creating a page in website with slug "elb-health-check" then I added a block in nginx.conf this "location /elb-health-check { access_log off; return 200; }". Do you think this is an ideal approach to check the actual health of the environment?
Relevant content
- asked 2 months ago
- asked 2 years ago
- asked 3 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 days ago
- AWS OFFICIALUpdated 2 years ago
Thank you Riku for looking into my issue. This is my only redirection "location / { return 301 https://$host$request_uri; }" for http to https.
As Gary says, if you redirect to HTTPS with Nginx, a redirect loop will occur. Therefore, I think it is necessary to eliminate redirect settings in Nginx.
I've already removed the redirect
The ALB health check is a GET request, so if you can confirm that the application is running at least when you access that path, I don't think there will be any problems.