Error Unhealthy task in ECS

0

I have a task definition with two containers, app and nginx (port 80), I have created a service including a Application Load Balancer, but always but every task check unhealthy often.

Enter image description here

My target group is

Enter image description here

My load balancer

Enter image description here

What is the posible error, I need to change "Path"

已提問 1 個月前檢視次數 592 次
1 個回答
1
已接受的答案

I found the error, I must to have in nginx

server { listen 80;

location /health {
    access_log off;
    return 200 'ok';
    add_header Content-Type text/plain;
}

# Configuración adicional de tu servidor aquí

}

And update the PAth in my target groups "/health"

Working perfect now

已回答 1 個月前
profile picture
專家
已審閱 1 個月前
profile picture
專家
A_J
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南