컴퓨터/노트북/인터넷
IT 컴퓨터 기기를 좋아하는 사람들의 모임방
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 컴퓨터 기기를 좋아하는 사람들의 모임방
번호 | 분류 | 제목 | 조회 수 | 날짜 |
---|---|---|---|---|
공지 | 뉴스 |
구글 최신 뉴스
![]() |
1384 | 2024.12.12 |
공지 | 사랑LOVE 포인트 만렙! 도전 | 4590 | 2025.03.19 | |
공지 | 🚨(뉴비필독) 전체공지 & 포인트안내 2 | 25843 | 2024.11.04 | |
공지 | URL만 붙여넣으면 끝! 임베드 기능 | 20425 | 2025.01.21 | |
10639 | [이벤트] 2021 신축년 설날 제닉스 눈치게임 이벤트! | 26 | 2021.02.11 | |
10638 | [이벤트] ARENA-X 풋레스트 게이밍의자 캐치프레이즈 맞추기! | 29 | 2021.02.11 | |
10637 | 히타치 하드 포맷을 하려고 하는데요 2 | 1437 | 2014.06.13 | |
10636 | 희비 엇갈린 LG-SK…이제 공은 특허소송으로 | 22 | 2021.02.12 | |
10635 | 일반 | 희비 엇갈린 LG-SK…이제 공은 특허소송으로 | 97 | 2023.03.27 |
10634 | 일반 | 흠 윈도업뎃후 다운 | 96 | 2022.03.03 |
10633 | 일반 |
흠 윈도11 문제인가 크롬문제인가
![]() |
495 | 2022.03.29 |
10632 | 일반 | 흠 블투스피커 다 고장났네 | 86 | 2022.03.08 |
10631 | 일반 | 흙수저용 게이들을 위해서 좌식 컴퓨터 책상의자 뽑아봤다 1 | 164 | 2018.12.12 |
10630 | 일반 | 흑흑 결국 2테라 하드를 구해야 한다니 | 89 | 2022.02.10 |
10629 | 일반 | 흑자예상하며 기다린보람이 있군 | 471 | 2016.02.28 |
10628 | 일반 | 흐린 날씨에 7월 첫째 날이자 금요일이네요. | 542 | 2022.12.31 |
10627 | 정보 | 휴대폰에서 이상한 소리 (삐-삐-)가 납니다 | 3718 | 2021.11.29 |
10626 | 일반 | 휴대폰에서 이상한 소리 (삐-삐-)가 납니다 | 1531 | 2023.03.27 |
10625 | 정보 | 휴대폰성지 '좌표동맹' 아이폰12미니, 갤럭시노트20 핸드폰싸게사는법 시세표 공개 - 기호일보 | 778 | 2021.03.06 |
10624 | 일반 | 휴대폰 전체 다 그대로 다른 휴대폰으로 | 60 | 2022.01.01 |
10623 |
휴대폰 기종 뭔지 아시는 선생님 계실까요
1 ![]() |
389 | 2023.05.05 | |
10622 | 일반 | 휴대폰 교체시 문자 백업은 어떻게 하면 될까요? | 234 | 2022.02.21 |
10621 | 일반 | 휴대폰 교체시 문자 백업은 어떻게 하면 될까요? | 1587 | 2023.03.27 |
10620 | 일반 | 휴대용 컴프레셔 | 425 | 2022.12.31 |
10619 | 일반 |
휴대용 에어컨🆒대우 네오아미코 개봉기 [4K]
![]() |
84 | 2023.03.27 |
10618 | 정보 | 휴대성은 그램, 성능은 맥북… 가격은 둘다 고민되네 - 조선일보 | 749 | 2021.02.21 |
10617 | 일반 | 훌랄라 vs bhc 양념반 후라이드반 | 319 | 2022.03.09 |
10616 | 일반 | 훈수 듣고 성공한 bj | 552 | 2022.12.31 |
10615 | 일반 | 후쿠시마 앞바다에서 규모 7.2 지진 발생 | 548 | 2022.12.31 |
10614 | 일반 |
후 삿다......
![]() |
75 | 2022.02.14 |
10613 | 일반 |
효정님께
![]() |
78 | 2022.01.04 |
10612 | 일반 |
효도컴 이륙가능..?
![]() |
466 | 2022.04.12 |
10611 | 회원님들 파워렉스 REX III 600W Triple V2.3 요거 어떤가여 4 | 1592 | 2014.06.11 | |
10610 | 일반 | 회사에서 차를 지원해줘서!! | 70 | 2022.01.07 |