반응형
AWS ELB - health check (nginx_proxy 설정)
index 파일 생성
cat > /etc/nginx/html/healthcheck
hello world
nginx config 설정
location ^~ /healthcheck.html
{
root /etc/nginx/html;
}
구성 예시
server
{
listen 80;
server_name example.com;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_redirect off;
keepalive_timeout 0;
proxy_read_timeout 5s;
proxy_send_timeout 5s;
send_timeout 5s;
resolver_timeout 5s;
client_body_timeout 500s;
client_max_body_size 1000m;
location ^~ /healthcheck.html
{
root /etc/nginx/html;
}
location / {
proxy_pass_header Server;
proxy_pass http://localhost:8080;
proxy_intercept_errors on;
}
}
by mkdir-chandler
728x90
반응형
'Ops > AWS' 카테고리의 다른 글
AWS ELB - www redirect 설정 (0) | 2023.07.16 |
---|---|
AWS ELB - https redirect 설정 (0) | 2023.07.15 |
AWS ELB - health check (nginx 설정) (0) | 2023.07.13 |
AWS ELB - alb 규칙 추가 (0) | 2023.07.12 |
AWS EKS - client.authentication.k8s.io/v1alpah1 (0) | 2023.07.11 |