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 | 25984 |
공지 | System | URL만 붙여넣으면 끝! 임베드 기능 | 2025.01.21 | 20464 |
378944 |
더본코리아 통합 할인전 – 최대 50%할인(5/13~5/25)
2 ![]() ![]() |
2025.06.13 | 22 | |
378943 | 잡담 |
진격의거인 ost 가사를 독일어로 만든게 한수였어
![]() ![]() |
2025.06.13 | 16 |
378942 | 생활용품 |
그립) 아이러브베베 시그니앙 골드퍼플 82고평량 물티슈 70매 20팩 23,900원 무배
![]() ![]() |
2025.06.13 | 527 |
378941 | 유머 |
방송에서 아이유한테 전 남친 모먼트 대놓고 한 배우
1 ![]() ![]() |
2025.06.13 | 28 |
378940 |
불금 언제와
2 ![]() |
2025.06.13 | 27 | |
378939 |
아아 오백원 찬쓰 끝나니까
1 ![]() |
2025.06.13 | 24 | |
378938 | 의류 |
타미힐피거 여성 슬림 티셔츠
![]() ![]() |
2025.06.13 | 382 |
378937 |
늦은 점심
1 ![]() |
2025.06.13 | 37 | |
378936 |
제주도 날씨
1 ![]() |
2025.06.13 | 43 | |
378935 | 생활용품 |
지마켓) 딥큐 3in1 실내건조 캡슐세제 오션브리즈 100개+100개 15,920원 무배
![]() ![]() |
2025.06.13 | 1028 |
378934 |
배고프다
![]() |
2025.06.13 | 57 | |
378933 |
배고프다
![]() |
2025.06.13 | 63 | |
378932 | 먹거리 |
쿠팡골박) 휴대용 손선풍기 (21,900원/무배)
![]() ![]() |
2025.06.13 | 248 |
378931 |
500원 아아 끝났네ㅠ
2 ![]() |
2025.06.13 | 100 | |
378930 |
자전거 펑크나서 출근은 버스로 ㅜ
1 ![]() |
2025.06.13 | 133 | |
378929 |
아침엔 모닝커피 한잔
1 ![]() |
2025.06.13 | 120 | |
378928 | 먹거리 |
오뚜기몰 4+4 오뚜기 진라면 약간매운맛/매운맛/순한맛 외
2 ![]() |
2025.06.13 | 6077 |
378927 | 잠이안와 | 2025.06.13 | 253 | |
378926 | 의류 |
네이버)이현이님 틴트 선글라스 할인딜 7,720원
![]() |
2025.06.13 | 256 |
378925 |
암표 팔아서 결혼하는 사람.jpg
![]() |
2025.06.12 | 267 | |
378924 | 유머 |
블룸버그 "중국 텐센트, 150억달러(20조)에 넥슨 인수 준비중" ㄷㄷㄷ
![]() |
2025.06.12 | 281 |
378923 | 유머 |
ㅇㅎ?) 일본 AV 배우들이 문신을 잘 하지 않는 이유..
![]() |
2025.06.12 | 283 |
378922 | 유머 |
추억의 분식집 장우동
![]() |
2025.06.12 | 288 |
378921 | 유머 |
주식 유튜브 vs 코인 유튜브 차이
![]() |
2025.06.12 | 310 |
378920 | 유머 |
오늘자 카페 빌런
![]() |
2025.06.12 | 302 |
378919 | 유머 |
혐한을 대하는 일본 AV 여배우의 적절한 대응
![]() |
2025.06.12 | 266 |
378918 | 유머 |
콘서트 하늘나라석.jpg
![]() |
2025.06.12 | 293 |
378917 | 유머 |
노르웨이 연어 근황
![]() |
2025.06.12 | 302 |
378916 | 유머 |
아 타투 하려는데 이상한 사람이 와서 꼽줌 개짜증
![]() |
2025.06.12 | 288 |
378915 | 유머 |
일본 AV 배우들이 문신을 하지 않는 이유
![]() |
2025.06.12 | 305 |