웹마스터 팁

Some work I've been doing recently has involved debugging a Mambo installation. The website had developed the curious ability to block the editing of certain articles, but allowed other ones through. These blocked attempts to save articles were resulting in a '406 Not Acceptable' error.

According to the W3 specification, this means:

The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.

Say what?

After a lot of hair-pulling I tracked the problem down to a few words, such as '<script' and '&amp;', which when included caused the error. This made me very suspicious - why would Mambo only block this HTML code? I explored further by inserting debug code into Mambo and then waited for the result... nothing. Mambo wasn't even being called.

This meant the problem must be before Mambo, and there was only one thing that could be responsible: Apache.

Some Googling later and I found information about an optional Apache module called mod_security. This is a very nice module that acts as an Apache firewall - it blocks a lot of the usual routes that people use to hack websites. In particular it scans POST requests (sent when you 'save' something on a website'), and displays a 406 error for anything controversial. Bingo!

The reason I'm documenting these frustrating few hours of my life is in the hope that it may prove useful to someone else. It appears that mod_security, if configured aggressively, can cause a lot of problems and these may manifest themselves in Mambo, WordPress, or any piece of web software.

The solution was very simple. The following lines were added to the .htaccess file to disable mod_security:

20080205.JPG

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Naturally you loose any benefits that mod_security might bring, but that's better than a non-functioning website, and you can always ask for the security configuration to be toned down to a more acceptable level.


외국사이트에서 보구 해결한겁니다.
내용에대한설명은 접구 결론은 저 모드에 대한 보안은 없어지지만 사이트가 더 잘돌아가는게 낫지 않겠냐하는 말입니다.

.htaccess 에 아래문구를 집어넣으면 해결입니다.

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

부디 도움이되시길....

태그 연관 글
  1. [2019/04/21] 웹마스터 팁 1.11.3 업로드 패치 이후 업로드 오류 관련 by 우소푸
  2. [2018/12/12] 묻고답하기 관리자 로그인 페이지 406 Not Acceptable 에러 by 절대불가 *1
  3. [2017/10/21] 포럼 Transfer-encoding: chunked 대용량 파일 첨부 시 에러 문제 by diomin *2
  4. [2017/07/22] 묻고답하기 닷홈게시판 Wix홈페이지 연결오류 by 한우 *1
  5. [2016/10/17] 묻고답하기 https 관련 질문입니다 ㅠㅠ by 쿠닌 *1
제목 글쓴이 날짜
쭘's식 홈페이지 만들기 No.3 - 깔끔 노프레임 (미리보기 포함) [37] file 쭘's 2003.06.07
스크롤바 내맘대루 색바꾸기 [예제추가] [5] ˚ⓢⓘⓔ。 2003.06.07
펼침메뉴소스 [12] 이성헌 2003.06.08
[매크로] 노프레임 페이지 작성시 나모에서 링크 타겟 매크로로 입력하기 [4] 김병희 2003.06.14
자신이 만든 문서가 HTML(XHTML) 표준에 따르고 있는지 검사해 보는 방법. [6] 귀여운Rootin 2003.06.14
[매크로] mac_0004 메뉴를 담은 표의 위치와 모양 바꿔치기 매크로 [1] 김병희 2003.06.16
쭘's식 홈페이지 만들기 No.4 - (미리보기 포함) [26] file 쭘's 2003.06.16
새창에서 세로스크롤만 되도록 하기 [10] 윙크벨 2003.06.26
노프레임 게시판을 만들때 이미지 경로지정 [11] webzang 2003.06.26
[HTML에 필터 적용] 알파 필터 filter: Alpha(Opacity= 적용에 주의할 참고사항들 [2] 김병희 2003.06.28
반짝이게 해보자 [5] 팩맨24 2003.07.03
도메인 주소를 고정한 페이지를 새로고침해도 처음으로 돌아가는것을 방지 ★ [24] 새벽이슬 2003.07.05
히야[HIYA] - 노프레임 왕초보가되어 프로젝트 !! [ 노프레임 홈피 만들기 !! 7번째강좌 ] [19] 공찬영 2003.07.05
쭘's식 홈페이지 만들기 No.5 - (미리보기 포함) [18] file 쭘's 2003.07.07
내 카페/홈페이지에 뉴스 달기 소스 공개 [9] 깜보 2003.07.10
노프레임 홈만들기 (1) - 표로 레이아웃 만들고 그림 삽입하기 [45] file @kihwa 2003.07.11
링크부분에 밑줄을 없애는 방법.... [10] 공유 2003.07.19
링크 클릭시 점선 없애는 이벤트. 일일히 지정안하고 한꺼번에 되게 하기. [14] 최용근 2003.07.24
HTML필수 항목( 기본구조)- 초보자용 입니다! 김수한 2003.07.25
홈제작에 있어 가장중요한 "경로지정의 이해" 1편 입니다. [5] 김수한 2003.07.25