Apache 2.4 이상 버전에서 403 에러가 발생. error.log 를 보니 다음과 같은 에러가 있었다.
[Tue Dec 11 17:49:19.350384 2012] [authz_core:error] [pid 5308:tid 1576] [client 127.0.0.1:53603] AH01630: client denied by server configuration: /DOCUMENT_ROOT
아마도 우분투를 업그레이드하면서 (2.2에서 2.4로 업그레이드) 기존에쓰던 conf 파일 옵션값이 문제를 일으킨모양이다.
apache 2.2
<Directory /DOCUMENT_ROOT> ~~~ Order allow,deny Allow from all </Directory>
apache 2.4 최신
<Directory /DOCUMENT_ROOT> ~~~ Require all granted </Directory>
아래는 apache 공식사이트 설명문서다.
https://httpd.apache.org/docs/2.4/upgrading.html
2.2 configuration:
Order deny,allow Deny from all
2.4 configuration:
Require all denied
In this example, there is no authentication and all requests are allowed.
2.2 configuration:
Order allow,deny Allow from all
2.4 configuration:
Require all granted
In the following example, there is no authentication and all hosts in the example.org domain are allowed access; all other hosts are denied access.
2.2 configuration:
Order Deny,Allow Deny from all Allow from example.org
2.4 configuration:
Require host example.org
In the following example, mixing old and new directives leads to unexpected results.
Mixing old and new directives: NOT WORKING AS EXPECTED
DocumentRoot "/var/www/html" <Directory "/"> AllowOverride None Order deny,allow Deny from all </Directory> <Location "/server-status"> SetHandler server-status Require local </Location> access.log - GET /server-status 403 127.0.0.1 error.log - AH01797: client denied by server configuration: /var/www/html/server-status
Why httpd denies access to servers-status even if the configuration seems to allow it? Because mod_access_compat
directives take precedence over the mod_authz_host
one in this configuration merge scenario.
This example conversely works as expected:
Mixing old and new directives: WORKING AS EXPECTED
DocumentRoot "/var/www/html" <Directory "/"> AllowOverride None Require all denied </Directory> <Location "/server-status"> SetHandler server-status Order deny,allow Deny from all Allow From 127.0.0.1 </Location> access.log - GET /server-status 200 127.0.0.1
So even if mixing configuration is still possible, please try to avoid it when upgrading: either keep old directives and then migrate to the new ones on a later stage or just migrate everything in bulk.
In many configurations with authentication, where the value of the Satisfy
was the default of ALL, snippets that simply disabled host-based access control are omitted:
2.2 configuration:
# 2.2 config that disables host-based access control and uses only authentication Order Deny,Allow Allow from all AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure Require valid-user
2.4 configuration:
# No replacement of disabling host-based access control needed AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure Require valid-user
In configurations where both authentication and access control were meaningfully combined, the access control directives should be migrated. This example allows requests meeting both criteria:
2.2 configuration:
Order allow,deny Deny from all # Satisfy ALL is the default Satisfy ALL Allow from 127.0.0.1 AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure Require valid-user
2.4 configuration:
AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure <RequireAll> Require valid-user Require ip 127.0.0.1 </RequireAll>
In configurations where both authentication and access control were meaningfully combined, the access control directives should be migrated. This example allows requests meeting either criteria:
2.2 configuration:
Order allow,deny Deny from all Satisfy any Allow from 127.0.0.1 AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure Require valid-user
2.4 configuration:
AuthType Basic AuthBasicProvider file AuthUserFile /example.com/conf/users.passwd AuthName secure # Implicitly <RequireAny> Require valid-user Require ip 127.0.0.1
번호 | 분류 | 제목 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | 안내 |
🚨(뉴비필독) 전체공지 & 포인트안내
8 ![]() ![]() |
2024.11.04 | 25980 |
공지 | System | URL만 붙여넣으면 끝! 임베드 기능 | 2025.01.21 | 20464 |
378703 | 일반 | Synology의 4 베이 NAS 장비 "DiskStation DS416j" | 2016.02.08 | 1462 |
378702 | 일반 | 태블릿 PC의 충전을하면서 주변 기기를 사용할 수있는 OTG 지원 USB 허브 | 2016.02.08 | 1445 |
378701 | 일반 | 카페베네 상장 난항에 투자자 눈물 | 2016.02.15 | 783 |
378700 | 일반 | 주식, 욕심은 화를 부르고. 그 화는 고스란히 가족들에게 짜증을 부릴겁니다 | 2016.02.22 | 797 |
378699 | 일반 | 원익IPS 추천합니다 | 2016.02.22 | 681 |
378698 | 일반 | 장이 너무 안좋네요 ㅜㅜ | 2016.02.22 | 714 |
378697 | 일반 | 주식투자와 관련된 주식명언 | 2016.02.22 | 1006 |
378696 | 일반 | i5-6600 i5-6500 비교 1 | 2016.02.22 | 1441 |
378695 | 일반 | ssd좀봐주세요 2 | 2016.02.27 | 913 |
378694 | 일반 | 크라운제과 어떻게 보시나요? | 2016.02.28 | 462 |
378693 | 일반 | 흑자예상하며 기다린보람이 있군 | 2016.02.28 | 476 |
378692 | 일반 | 세계 주식 주요 지수 보는곳 입니다.모르시는분들을 위해 | 2016.02.28 | 649 |
378691 | 일반 | 한 2월 말쯤 총선테마가 시작될걸로 예상합니다. | 2016.02.28 | 567 |
378690 | 일반 | 대중관계 악화로 중국에서 돈버는 기업들 급락이네요 | 2016.02.28 | 690 |
378689 | 일반 | 주식 생초보인데 알려주실수 있으신가요? | 2016.02.28 | 519 |
378688 | 일반 | 11시정도만 잘 넘기면 될거같은데.. | 2016.02.28 | 481 |
378687 | 일반 | 요즘 한종목에 꽂혀서 분할매수하는데요. | 2016.02.28 | 568 |
378686 | 잡담 | 국정원에서 해킹 프로그램을 구매한 내용들 (영상) | 2016.03.01 | 816 |
378685 | 일반 | 본인 명의로 핸드폰 두개 개설 하면 문제 생기나요? 1 | 2016.03.01 | 1160 |
378684 | 잡담 | 샤오미5 Xiaomi5 | 2016.03.02 | 817 |
378683 | 일반 | 단말기대금 일시불납 가능한가요? 1 | 2016.03.05 | 781 |
378682 | 일반 | 노트4 배터리 공유?? 1 | 2016.03.05 | 1749 |
378681 | 일반 | 금호타이어 어떻게 보시나요? | 2016.03.05 | 650 |
378680 | 일반 | 해외에서 사용하던 도메인을 구입했는데 헉.. | 2016.03.09 | 568 |
378679 | 일반 | 축구 페널티킥 선방 탑10 | 2016.03.12 | 469 |
378678 | 일반 | SSD의 성능을 유지하기위한 유지 관리 기술 | 2016.03.15 | 1071 |
378677 | 일반 | 저렴한 Skylake 버전 Xeon 마더보드 'GA-X150M-PRO ECC」 | 2016.03.15 | 880 |
378676 | [인케이스백팩]나는 인케이스 백팩이 탐난다. | 2011.04.02 | 602 | |
378675 | 잡담 | 이쁜 얼굴 만드는 미용 비법 53가지 - 얼굴 예뻐지는 법 - [피부 관리] 3 | 2011.04.23 | 612 |
378674 | 유이-애프터스쿨 유이 사진모음-[유이 애프터스쿨] | 2011.04.29 | 506 |