아파치 mod security 비활성화하기

how to disable mod_security on apache
아파치 mod security 비활성화하기

1 문제상황[ | ]

  • 미디어위키 설치 중 다음과 같은 경고가 나온다.

Warning: Your web server has mod_security enabled. If misconfigured, it can cause problems for MediaWiki or other software that allows users to post arbitrary content.
→ 경고: 웹 서버에 mod_security가 허용되었습니다. 잘못 설정된 경우 미디어위키나 사용자가 임의의 콘텐츠를 게시할 수 있는 다른 소프트웨어에 대한 문제를 일으킬 수 있습니다. mod_security 문서를 참고하거나 임의의 오류가 발생할 경우 호스트의 지원 요청에 문의하십시오.

  • 그래서 mod_security를 비활성화할 것이다.

2 해결방법[ | ]

확인
[root@zetawiki ~]# apachectl -D DUMP_MODULES | grep security
 security2_module (shared)
Syntax OK
→ security2_module 이 적재되어 있고...
[root@zetawiki ~]# cat /etc/httpd/conf/httpd.conf | grep mod_security
LoadModule security2_module modules/mod_security2.so
→ 실제 파일은 mod_security2.so
수정
  • vi 편집기로 httpd.conf 파일을 열고 security2_module가 있는 행을 주석처리(맨앞에 # 추가)하고 저장
[root@zetawiki ~]# vi /etc/httpd/conf/httpd.conf
[root@zetawiki ~]# cat /etc/httpd/conf/httpd.conf | grep mod_security
#LoadModule security2_module modules/mod_security2.so
아파치 재시작
[root@zetawiki ~]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
확인 2
[root@zetawiki ~]# apachectl -D DUMP_MODULES | grep security
Syntax OK

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}