웹마스터 팁

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
제목 글쓴이 날짜
각 OS별 브라우저별 자신의 웹사이트 보기??? [12] 세바스챤_™ 2008.01.31
리눅스 호환 호스팅에서 zbxe 전체 업로드 후 디렉토리 이동시키기... [4] 소마세월 2008.02.02
포인트 수정없이 원하는 레벨 아이콘이나 원하는 이미지 출력하기(0.29용) [20] 지연아빠 2008.02.02
flash <=> xe menu 연동 [7] tsana 2008.02.03
특정 게시판, 업로드된 그림 자동으로 본문에 출력하기 [14] file 대암지기 2008.02.03
본인외 회원정보 제어 [1] edgarkim 2008.02.03
BGM 등을 배경을 투명하게 iframe 으로 넣는 팁 [3] 푸른커튼 2008.02.05
왼쪽메뉴줄이고 오른쪽에 박스만들어 내용쉽게넣기 [15] file plruto 2008.02.07
주소끝에 /zbxe 안적어도 홈페이지에 바로 들어오게 하는법?? [10] 박태훈922 2008.02.07
HTTP 406 Error 가 나오면서 업로드 안될때 [16] file plruto 2008.02.08
아날로그 플래시 시계 10종류 (홈페이지, 블로그용) file 푸른커튼 2008.02.09
이미지 줌 아웃슬라이드 [4] 맨발 2008.02.10
로그인후 보여줄 페이지 설정 [4] 권인해 2008.02.11
회원가입 생일 필수로 입력받고, 관리자페이지 회원목록에 회원생일 출력하기 [10] 대암지기 2008.02.11
제로보드용 플래시시계 위젯 설치방법 file 푸른커튼 2008.02.12
드림위버 등에서 레이아웃 편집시에.. [3] 은진아빠 2008.02.12
특정게시판, 비밀글로 작성하기 [19] file 대암지기 2008.02.13
전에 누군가 찾았던 것인데..새로고침시 현재페이지로 [2] 강영곤 2008.02.14
zbXE User Guide - 3차수정 [3] file 캬캬캬캬캬캬 2008.02.16
[전면수정]회원가입시 기본 정보공개 여부 체크하기(2) 스킨부분 대암지기 2008.02.17