I was finally able to solve this.
In my case, as well has following Robin's instructions, I had to set the listener as follows (this is in the case of an AWS classic load balancer):
Load Balancer Protocol | Load Balancer Port | Instance Protocol | Instance Port | Cipher | SSL Certificate |
HTTPS | 443 | HTTP | 80 | xxxxx
| xxxxxxxxxxx
|
and then set the health check like this:
Ping Target | TCP:<portnumber> |
Timeout | x seconds |
Interval | xseconds |
Unhealthy threshold | x |
Healthy threshold | x
|
in a classic load balancer when you seth the healt check as tcp it only checks that the receiving instance is capable of receiving in the specified port, therefore, you dont have to worry about setting a healtcheck file such as an index.html.
I'm in the process of setting a fully autoscaling enviroment for moodle in aws. since I have not found any instructions online on how to complete this endeavour I will be posting a full guide once I'm done with the deployment, in case someone else is strugling.