python/fastapi
nginx ELB-HealthChecker/2.0 log 없애기
thomass
2023. 3. 17. 11:38
Elastic Load Balancer을 사용하여 https 설정 후
access로그에 계속 ELB-HealthChecker/2.0라고 떠서 다른로그를 볼수가없을때
ubuntu
cd /etc/nginx/sites-enabled/
nano 자신의 설정값 접속
map $http_user_agent $ignore_ua {
default 1;
"ELB-HealthChecker/2.0" 0;
}
server {
client_max_body_size 0;
listen 80;
server_name 내아이피주소;
location = /favicon.ico { access_log off; log_not_found off; }
location / {
access_log /자신경로/logs/nginx_access.log combined if=$ignore_ua;
error_log /자신경로/logs/nginx_error.log;
include proxy_params;
proxy_pass http://unix:/tmp/test.sock;
}
}
후
sudo systemctl restart nginx
반응형