조회 수 65 추천 수 0 댓글 0

단축키

Prev이전 문서

Next다음 문서

단축키

Prev이전 문서

Next다음 문서

Extra Form

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 

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
List of Articles
번호 분류 제목 글쓴이 조회 수 날짜
공지 뉴스 구글 최신 뉴스 file 덕후냥이 1456 2024.12.12
공지 일반 샤오미 BE6500 라우터 실사용 후기 (Wi-Fi 7 + 2.5G 스위치 기능까지 ㄷㄷ) 4 덕후냥이 1022 2025.06.28
공지 🚨(뉴비필독) 전체공지 & 포인트안내 22 무명의덕질 29003 2024.11.04
공지 URL만 붙여넣으면 끝! 임베드 기능 무명의덕질 23086 2025.01.21
6643 일반 ? 페어폰? file 덕후냥이 63 2022.03.03
6642 일반 ???: RTX 50이 전작보다 전기를 더먹는다고..? file 덕후냥이 77 2024.09.07
6641 일반 ???: 핫딜 올려봐~~~ 덕후냥이 108 2022.02.09
6640 일반 .Android 8.0 오레오의 신기술은 어떤것이 있을까 김말이님 81 2017.08.24
6639 일반 .Android 8.0 오레오의 신기술은 어떤것이 있을까 김말이님 94 2017.08.24
6638 일반 .exe 파일을 추출 하는 프로그램 덕후냥이 495 2023.03.27
6637 일반 '지원 종료' 윈도 서버 2003 사용 기업을 위한 2가지 조언 라이너스~ 747 2015.07.20
6636 일반 ‘30TB 벽’ 깬 32TB 하드 등장…소비자용 디스크 시대 저무는 이유 덕후냥이 210 2024.10.21
6635 일반 ‘테라’ 권도형 “싱가포르 있다”더니…현지 사무실 폐쇄 덕후냥이 750 2022.12.31
6634 일반 "갤럭시S6엣지 플러스, 3000mAh 대용량 배터리 탑재"… 왜? 라이너스~ 1083 2015.07.20
6633 일반 “SK하이닉스 내부자에 뚫렸다” 中이직 앞두고 1만여건 기술 유출 file 덕후냥이 617 2025.05.10
6632 일반 “SSD도 고장 난다” 토발즈의 발견에 대한 검증 댄디보이 815 2015.01.20
6631 일반 “갤럭시폴드2와 너무 똑같다?” 궁지에 몰린 화웨이 막 베낀다! 뉴스봇 753 2021.02.21
6630 일반 “넷플릭스보다 디즈니+” 냉정한 美 월가, 디즈니 손든 이유 덕후냥이 265 2023.03.27
6629 일반 “몸값 시한 지나면 자동 삭제”··· 랜섬웨어 ‘로키로커’가 당신을 노린다 덕후냥이 572 2022.12.31
6628 일반 “몸값 시한 지나면 자동 삭제”··· 랜섬웨어 ‘로키로커’가 당신을 노린다 덕후냥이 70 2023.03.27
6627 일반 “코어 수보다 동작 클록이 중요해” 인텔의 위기감 회원_75325653 142 2019.12.27
6626 일반 ㈜아이티스노우볼, 투자용 신용평가서 최상위급 &#039;Ti-2&#039; 등급 획득 덕후냥이 423 2023.03.27
6625 일반 (개발자분들을 위한 익스 호환성 태그) X-UA-Compatible Meta Tag Description and Uses: 덕후냥이 1422 2023.03.27
6624 일반 (꿀팁) 현재 핸드폰(스마트폰) 배터리수명을 체크하는 방법 덕후냥이 1128 2023.03.27
Board Pagination Prev 1 2 3 4 5 ... 333 Next
/ 333