컴퓨터/노트북/인터넷
IT 컴퓨터 기기를 좋아하는 사람들의 모임방
단축키
Prev이전 문서
Next다음 문서
단축키
Prev이전 문서
Next다음 문서
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
컴퓨터/노트북/인터넷
IT 컴퓨터 기기를 좋아하는 사람들의 모임방
번호 | 분류 | 제목 | 조회 수 | 날짜 |
---|---|---|---|---|
공지 | 뉴스 |
구글 최신 뉴스
![]() |
1454 | 2024.12.12 |
HOT글 | 일반 | 샤오미 BE6500 라우터 실사용 후기 (Wi-Fi 7 + 2.5G 스위치 기능까지 ㄷㄷ) 4 | 1016 | 2025.06.28 |
공지 | 🚨(뉴비필독) 전체공지 & 포인트안내 20 | 28835 | 2024.11.04 | |
공지 | URL만 붙여넣으면 끝! 임베드 기능 | 22959 | 2025.01.21 | |
6643 | 일반 |
나는 애플이 존나게 싫다
![]() |
107 | 2024.07.24 |
6642 | 일반 |
밑에 견적문의글
![]() |
64 | 2022.01.04 |
6641 | 일반 | 삼성에서 킬러 암호화폐 마이닝 ASIC 대량생산 | 66 | 2018.02.05 |
6640 | 일반 | 개인적으로 지금 가장 흥미진진한 사이트 | 81 | 2019.01.10 |
6639 | 일반 | 이시간에 ASUS 분해하는 내가 레전드 | 57 | 2020.12.06 |
6638 | 일반 | MODOOSIS TwingleBeam MDS-5300 Wireless PICO Projector Review 트윙글빔 리뷰 | 1134 | 2014.12.17 |
6637 | 일반 | 세상은 넓고 SSD는 많다! 1부 미국편 | 1088 | 2016.06.18 |
6636 | 일반 | [리뷰] ‘도전보다 안정을 택하다’ 갤럭시 노트20 울트라 - ① | 39 | 2021.01.24 |
6635 | 일반 | AMD가 FSR 2.0을 3월 17일에 발표? | 245 | 2022.12.31 |
6634 | 일반 | 코로나 후유증 | 657 | 2022.12.31 |
6633 | 일반 | 주식투자와 관련된 주식명언 | 1007 | 2016.02.22 |
6632 | 일반 | 결론은 이거지? | 67 | 2022.01.08 |
6631 | 일반 | 스마일게이트 '테일즈런너', 새로운 승부가 시작된다..'언더월드 리그' 실시 | 106 | 2023.03.27 |
6630 | 일반 | 레이드몹의 신작 RPG '루디엘' 영상 | 68 | 2023.03.27 |
6629 | 일반 | 윈도우 10 ‘블랙 스크린’ 문제 해결하기 | 99 | 2023.03.27 |
6628 | 일반 | 윈도우 11 디펜더(Windows 보안) 비활성화 먹통 문제 해결 | 313 | 2023.03.27 |
6627 | 일반 |
까다롭고 예민한 코골이에게💤AI 베개 제레마 프리뷰 [4K]
![]() |
77 | 2023.03.27 |
6626 | 일반 | 이정도는 돼야 카피캣이지 | 1109 | 2023.03.27 |
6625 | 일반 | 1년반만에 포맷했습니다 | 373 | 2022.04.02 |
6624 | 일반 | 블루스크린 오류코드 해석방법 | 737 | 2023.08.31 |