https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/tree/master/Apache_2.4
apache-ultimate-bad-bot-blocker/Apache_2.4 at master · mitchellkrogza/apache-ultimate-bad-bot-blocker
Apache Block Bad Bots, (Referer) Spam Referrer Blocker, Vulnerability Scanners, Malware, Adware, Ransomware, Malicious Sites, Wordpress Theme Detectors and Fail2Ban Jail for Repeat Offenders - mitc...
github.com
bat-bot-blocker을 사용해서 나쁜봇들을 막고 싶었다.
하지만 설정 해도 오류로 인하여 동작하지 않아 원인을 살펴보니 경로문제였다.


서비스로 등록된 아파치가 실행될 시 오류가 발생하면 실행이 되지않고 이벤트 로그를 보라고 나온다.
윈도우 이벤트 뷰어로 확인한 로그 내용
The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 561 of C:/Apache/conf/httpd.conf: Syntax error on line 280 of C:/Web Services/Apache/conf/extra/httpd-ssl.conf: Syntax error on line 840 of C:/Apache/conf/custom.d/globalblacklist.conf: Could not o

561라인에 문제가 있었던 것이다.
에러코드를 살펴보니 경로 문제가 분명했다.
나의 폴더 구조는이렇게 구성되있다.
기존 : Apache/conf/custom.d/봇제어 설정.conf
봇제어 기본설정.conf에서 내부적으로 호출하는
.conf 파일들의 경로 변경이 필요한데 그 작업을 하지 않아서 오류가 난 것이었다.
봇제어 설정 conf 파일 내부에서 호출하는 파일들은
Apache/custom.d/봇제어 설정.conf 이렇게 호출을 하고 있다.
따라서 나는 간단하게 수정하기 위해 설정 경로를
기본 설정인 Apache/custom.d/봇제어 설정.conf 이렇게 바꾸고
httpd-ssl.conf설정부분도 수정하였다.
자신의 서버 설정에 맞게 여러가지 설정방법이 존재한다.
나는httpd-ssl.conf에 이렇게 추가해주었다.

'개발 > 에러 해결' 카테고리의 다른 글
잔디먹는뱀 workflow build 오류 시 (2) | 2023.03.23 |
---|---|
[자바7] openssl tomcat 실행 오류 Invalid keystore format (0) | 2022.08.05 |
org.xml.sax.SAXParseException : <HR> (0) | 2022.07.26 |
[큐브리드] 윈도우 설치 시 한글 문자 깨짐 해결 (0) | 2022.05.17 |
[스프링]model 값에 자바객체를 넣고 jsp에서 jstl로 이용시 주의점 (0) | 2022.03.31 |
https://github.com/mitchellkrogza/apache-ultimate-bad-bot-blocker/tree/master/Apache_2.4
apache-ultimate-bad-bot-blocker/Apache_2.4 at master · mitchellkrogza/apache-ultimate-bad-bot-blocker
Apache Block Bad Bots, (Referer) Spam Referrer Blocker, Vulnerability Scanners, Malware, Adware, Ransomware, Malicious Sites, Wordpress Theme Detectors and Fail2Ban Jail for Repeat Offenders - mitc...
github.com
bat-bot-blocker을 사용해서 나쁜봇들을 막고 싶었다.
하지만 설정 해도 오류로 인하여 동작하지 않아 원인을 살펴보니 경로문제였다.


서비스로 등록된 아파치가 실행될 시 오류가 발생하면 실행이 되지않고 이벤트 로그를 보라고 나온다.
윈도우 이벤트 뷰어로 확인한 로그 내용
The Apache service named reported the following error:
>>> httpd.exe: Syntax error on line 561 of C:/Apache/conf/httpd.conf: Syntax error on line 280 of C:/Web Services/Apache/conf/extra/httpd-ssl.conf: Syntax error on line 840 of C:/Apache/conf/custom.d/globalblacklist.conf: Could not o

561라인에 문제가 있었던 것이다.
에러코드를 살펴보니 경로 문제가 분명했다.
나의 폴더 구조는이렇게 구성되있다.
기존 : Apache/conf/custom.d/봇제어 설정.conf
봇제어 기본설정.conf에서 내부적으로 호출하는
.conf 파일들의 경로 변경이 필요한데 그 작업을 하지 않아서 오류가 난 것이었다.
봇제어 설정 conf 파일 내부에서 호출하는 파일들은
Apache/custom.d/봇제어 설정.conf 이렇게 호출을 하고 있다.
따라서 나는 간단하게 수정하기 위해 설정 경로를
기본 설정인 Apache/custom.d/봇제어 설정.conf 이렇게 바꾸고
httpd-ssl.conf설정부분도 수정하였다.
자신의 서버 설정에 맞게 여러가지 설정방법이 존재한다.
나는httpd-ssl.conf에 이렇게 추가해주었다.

'개발 > 에러 해결' 카테고리의 다른 글
잔디먹는뱀 workflow build 오류 시 (2) | 2023.03.23 |
---|---|
[자바7] openssl tomcat 실행 오류 Invalid keystore format (0) | 2022.08.05 |
org.xml.sax.SAXParseException : <HR> (0) | 2022.07.26 |
[큐브리드] 윈도우 설치 시 한글 문자 깨짐 해결 (0) | 2022.05.17 |
[스프링]model 값에 자바객체를 넣고 jsp에서 jstl로 이용시 주의점 (0) | 2022.03.31 |