Shortcut
Prev이전 문서
Next다음 문서
Shortcut
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
| 번호 | 분류 | 제목 | 날짜 | 조회 수 | 추천 수 |
|---|---|---|---|---|---|
| 공지 | 뉴스 |
구글 최신 뉴스
|
2024.12.12 | 2210 | 0 |
| 공지 | 🚨 “뉴비 필독! 커뮤니티 사이트 안내 & 덕질 가이드 191 | 2025.10.18 | 18554 | 116 | |
| 공지 | 📢 [공모] "우리 커뮤니티 사이트, 뭐라고 부를까요?" 정체성을 찾아주세요! (1만P) 14 | 2026.01.17 | 12970 | 29 | |
| 10679 | 히타치 하드 포맷을 하려고 하는데요 2 | 2014.06.13 | 1467 | 0 | |
| 10678 | 희비 엇갈린 LG-SK…이제 공은 특허소송으로 | 2021.02.12 | 55 | 0 | |
| 10677 | 일반 | 희비 엇갈린 LG-SK…이제 공은 특허소송으로 | 2023.03.27 | 127 | 0 |
| 10676 | 일반 | 흠 윈도업뎃후 다운 | 2022.03.03 | 126 | 0 |
| 10675 | 일반 |
흠 윈도11 문제인가 크롬문제인가
|
2022.03.29 | 527 | 0 |
| 10674 | 일반 | 흠 블투스피커 다 고장났네 | 2022.03.08 | 115 | 0 |
| 10673 | 일반 | 흙수저용 게이들을 위해서 좌식 컴퓨터 책상의자 뽑아봤다 1 | 2018.12.12 | 194 | 0 |
| 10672 | 일반 | 흑흑 결국 2테라 하드를 구해야 한다니 | 2022.02.10 | 115 | 0 |
| 10671 | 일반 | 흑자예상하며 기다린보람이 있군 | 2016.02.28 | 514 | 0 |
| 10670 | 일반 | 흐린 날씨에 7월 첫째 날이자 금요일이네요. | 2022.12.31 | 573 | 0 |
| 10669 | 정보 | 휴대폰에서 이상한 소리 (삐-삐-)가 납니다 | 2021.11.29 | 3766 | 0 |
| 10668 | 일반 | 휴대폰에서 이상한 소리 (삐-삐-)가 납니다 | 2023.03.27 | 1558 | 0 |
| 10667 | 정보 | 휴대폰성지 '좌표동맹' 아이폰12미니, 갤럭시노트20 핸드폰싸게사는법 시세표 공개 - 기호일보 | 2021.03.06 | 804 | 0 |
| 10666 | 일반 | 휴대폰 전체 다 그대로 다른 휴대폰으로 | 2022.01.01 | 87 | 0 |
| 10665 |
휴대폰 기종 뭔지 아시는 선생님 계실까요
1 |
2023.05.05 | 416 | 0 | |
| 10664 | 일반 | 휴대폰 교체시 문자 백업은 어떻게 하면 될까요? | 2022.02.21 | 266 | 0 |
| 10663 | 일반 | 휴대폰 교체시 문자 백업은 어떻게 하면 될까요? | 2023.03.27 | 1619 | 0 |
| 10662 | 일반 | 휴대용 컴프레셔 | 2022.12.31 | 446 | 0 |
| 10661 | 일반 |
휴대용 에어컨🆒대우 네오아미코 개봉기 [4K]
|
2023.03.27 | 114 | 0 |
| 10660 | 정보 | 휴대성은 그램, 성능은 맥북… 가격은 둘다 고민되네 - 조선일보 | 2021.02.21 | 780 | 0 |
| 10659 | 일반 | 훌랄라 vs bhc 양념반 후라이드반 | 2022.03.09 | 347 | 0 |
| 10658 | 일반 | 훈수 듣고 성공한 bj | 2022.12.31 | 589 | 0 |
| 10657 | 일반 | 후쿠시마 앞바다에서 규모 7.2 지진 발생 | 2022.12.31 | 574 | 0 |
| 10656 | 일반 |
후 삿다......
|
2022.02.14 | 109 | 0 |
| 10655 | 일반 |
효정님께
|
2022.01.04 | 109 | 0 |
| 10654 | 일반 |
효도컴 이륙가능..?
|
2022.04.12 | 492 | 0 |
| 10653 | 회원님들 파워렉스 REX III 600W Triple V2.3 요거 어떤가여 4 | 2014.06.11 | 1620 | 0 | |
| 10652 | 일반 | 회사에서 차를 지원해줘서!! | 2022.01.07 | 97 | 0 |
| 10651 | 일반 |
회사에서 알지비를 키면?
|
2022.02.18 | 84 | 0 |
| 10650 | 일반 | 회사에 게저갈 가져올까 | 2022.03.23 | 178 | 0 |