반응형
AWS ELB - health check (nginx 설정)
LB 설정 (상태체크 URL)
/elb-status
nginx 설정
server {
location /elb-status {
access_log off;
return 200 'A-OK!';
add_header Content-Type text/plain;
}
}
nginx 설정 (전체 예시)
server {
listen 80;
server_name example.com;
access_log off;
error_log /home/search/log/nginx.error.log;
server_tokens off;
root /home/chandler/html;
error_page 403 /403.html;
location = /403.html {
root /etc/nginx/html;
}
error_page 400 404 /404.html;
location = /404.html {
root /etc/nginx/html;
}
error_page 500 501 502 503 504 /500.html;
location = /500.html {
root /etc/nginx/html;
}
location / {
index.html
}
location /elb-status {
return 200 'A-OK!';
add_header Content-Type text/plain;
}
}
by mkdir-chandler
728x90
반응형
'Ops > AWS' 카테고리의 다른 글
AWS ELB - https redirect 설정 (0) | 2023.07.15 |
---|---|
AWS ELB - health check (nginx_proxy 설정) (0) | 2023.07.14 |
AWS ELB - alb 규칙 추가 (0) | 2023.07.12 |
AWS EKS - client.authentication.k8s.io/v1alpah1 (0) | 2023.07.11 |
AWS EKS - 클러스터 삭제 방법 (cluster delete) (0) | 2023.07.10 |