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 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.13 | 765 |
378702 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.11 | 283 |
378701 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.15 | 889 |
378700 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.17 | 515 |
378699 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.13 | 730 |
378698 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.12 | 3025 |
378697 | 유머 |
힝.. 거기가 아닌데..
![]() |
2024.10.17 | 623 |
378696 | 잡담 | 힝 음식 한시간안에 온다머... | 2021.01.10 | 152 |
378695 |
힝 8~8 아무도 안먹어
![]() |
2021.01.26 | 218 | |
378694 | 잡담 | 힛힛힛힛힛힛 미쳐감 힛힛힛힛 | 2021.12.31 | 48 |
378693 | 잡담 |
힛츄윗댓 트루 트루 트루
![]() |
2023.03.22 | 2041 |
378692 | 사진/SNS |
힛지스 황희찬
![]() |
2025.05.31 | 8 |
378691 | 사진/SNS | 힛지스 착장인가 | 2025.05.19 | 358 |
378690 |
힛
![]() |
2023.07.06 | 47 | |
378689 |
힙합이 지배하기 전.. 홍대 풍경
![]() |
2023.11.14 | 244 | |
378688 |
힙합이 뭔지 아는 초등학생
![]() |
2022.09.07 | 72 | |
378687 | 잡담 | 힙합을 쉽게 정리해줌 | 2024.09.08 | 42 |
378686 |
힙합갤 코인노래방 참사
![]() |
2022.07.02 | 1786 | |
378685 | 잡담 | 힙합+하드락이래 | 2022.01.05 | 65 |
378684 | 힙합)쿤타가 생각하는 요즘 힙합이 무슨 힙힙이냐가 개소리인 이유 | 2021.12.29 | 43 | |
378683 | 힙합 유망주, 신인 래퍼들을 위한 슈퍼루키챌린지 이벤트! | 2022.12.27 | 180 | |
378682 | 유머 |
힙합 뮤지션 박재범 재산
![]() |
2025.06.05 | 554 |
378681 |
힙합 까기전에는 록 까는게 대세였지
![]() |
2022.06.12 | 237 | |
378680 |
힙한 동자승
![]() |
2023.10.30 | 468 | |
378679 |
힙한 동네 성수동으로 출퇴근 하는 사람들의 마음.jpg
![]() |
2024.09.17 | 89 | |
378678 | 힙하게의 힙이 옹동이였따니 | 2023.07.10 | 121 | |
378677 | 힙하게는 왜 그리고 하필 저런 설정에 이민기야 | 2023.07.10 | 144 | |
378676 | 힙하게감독 이민기엄청좋아하던데 | 2023.07.10 | 151 | |
378675 |
힙하게 티저 이건데 볼사람은 봐바
![]() |
2023.07.10 | 141 | |
378674 | 힙하게 캐릭 설정 보니까 남주가 여주 능력이 필요한가보네.... | 2023.07.10 | 144 |