컴퓨터/노트북/인터넷
IT 컴퓨터 기기를 좋아하는 사람들의 모임방
조회 수 1041 추천 수 0 댓글 0
우분투에서 해결방법
아래와 같이 더미로그가 생성된다. ::1 = IPv6 인터페이스와 관련있다고 한다.
::1 - - [26/Mar/2020:16:10:30 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:31 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:32 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:33 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)" ::1 - - [26/Mar/2020:16:10:35 +0900] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g (internal dummy connection)"
해결책
ubuntu : /etc/apache2/apache2.conf
SetEnvIf Remote_Addr "127 .0 .0 .1"dontlog SetEnvIf Remote_Addr ":: 1"dontlog SetEnvIf User-Agent ". * internal dummy connection.*"dontlog
위 줄을 로그포맷이 있는 위쪽에 추가하면 간단하게 해결된다.
인터넷에 검색해보면 sites-available/000-default.conf
이곳에 위 지시자를 넣어 해결하라는데...안먹힌다.
CENTOS 해결방법
아래 지시자를 httpd.conf에 추가하면된다.
SetEnvIf Remote_Addr "::1" loopback SetEnvIf Remote_Addr "127.0.0.1" loopback CustomLog ${APACHE_LOG_DIR}/access_log combined env=!loopback
또한 우분투의경우 CustomLog logs/access_log common 를
CustomLog logs/access_log combined 로 변경할 필요는 없어보인다.
아마도 대부분의 사람들이 다른 블로거들이 남긴글을 복사해서 설정하는 방법을 남긴것같다.
아파치버전이 업그레이드 되면서 여러가지가 변경되어 애먹는 사람이 많은것 같아 남겨둔다.