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 | 25976 |
공지 | System | URL만 붙여넣으면 끝! 임베드 기능 | 2025.01.21 | 20464 |
378703 |
메종21g 성수동에서 팝업열리네?
![]() ![]() |
2025.06.12 | 1 | |
378702 | 잡담 |
돈안갚는 사람 심리 뭐야???
![]() |
2025.06.12 | 13 |
378701 | 유머 |
담배 피는거로 오해 많이 받았다는 소녀시대 효연
![]() ![]() |
2025.06.12 | 4 |
378700 | 유머 |
담배 피는거로 오해 많이 받았다는 소녀시대 효연
![]() ![]() |
2025.06.12 | 9 |
378699 | 유머 |
담배 피는거로 오해 많이 받았다는 소녀시대 효연
![]() ![]() |
2025.06.12 | 6 |
378698 | 화장품 |
11번가) 헤라 6월 써머 베스트 상품 기획전 33,340원~
![]() ![]() |
2025.06.12 | 57 |
378697 | 화장품 |
[11번가] 미샤 썸머 페스티벌
![]() ![]() |
2025.06.12 | 19 |
378696 | 잡담 |
약산성 그런건 언제쓰는거야?
1 ![]() |
2025.06.12 | 24 |
378695 |
피부껍데기 뜯는거 못참아
2 ![]() |
2025.06.12 | 23 | |
378694 | 먹거리 |
11번가) 산루카스 아보카도 오일 1L 22,740원
![]() ![]() |
2025.06.12 | 72 |
378693 | 잡담 |
에렌뒤에 초대형거인 얼굴보임😱
![]() ![]() |
2025.06.12 | 26 |
378692 |
이제 진짜 덥다..
1 ![]() |
2025.06.12 | 23 | |
378691 | 유머 |
신나는 여고 교생 실습 첫날
![]() ![]() |
2025.06.12 | 27 |
378690 | 유머 |
현재까지 멤버 4명중 3명이 리무진 서비스 출연한 키스오브라이프
2 ![]() ![]() |
2025.06.12 | 55 |
378689 | 유머 |
50대 동안유지 나이트루틴 공개한 김준희.jpg
![]() ![]() |
2025.06.12 | 56 |
378688 | 유머 |
지구촌 얼척없이 웃긴 새소리 모음ㅋㅋ
![]() ![]() |
2025.06.12 | 92 |
378687 | 생활용품 |
[롯데온] 네파 남녀 아르테 롱 다운자켓 (208,040원/무료)
![]() |
2025.06.12 | 887 |
378686 | 밤인데 잠이안온다 | 2025.06.12 | 181 | |
378685 | 잡담 | 주술회전 애니 후기 2 | 2025.06.11 | 232 |
378684 | 이슈 |
솔로가수 규빈(GYUBIN) 인스타그램 업데이트
![]() |
2025.06.11 | 210 |
378683 | 이슈 | X:IN(엑신) - Attention seeker | 쇼챔피언 | 2025.06.11 | 251 |
378682 | 화장품 |
뽑아쓰는 콜라겐 마스크팩 30매 1+1 장당 352원
![]() |
2025.06.11 | 1756 |
378681 | 운동 갈까말까 1 | 2025.06.11 | 241 | |
378680 | 유머 |
시키짱, 나니가 스키?? 아나따
![]() |
2025.06.11 | 269 |
378679 | 생활용품 |
글로우 업 틴트 6colors
![]() |
2025.06.11 | 298 |
378678 | 야식 뭐먹지 | 2025.06.11 | 257 | |
378677 | 주말 언제와 | 2025.06.11 | 257 | |
378676 | 오늘도 야근이다 1 | 2025.06.11 | 258 | |
378675 | 의류 |
[네이버] 기능성 카라 반팔 티셔츠 8,000원 배송비 3,000원
![]() |
2025.06.11 | 267 |
378674 | 와..adhd 검사받았는데 2 | 2025.06.11 | 293 |