컴퓨터/노트북/인터넷
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 포인트 만렙! 도전 | 4603 | 2025.03.19 | |
공지 | 🚨(뉴비필독) 전체공지 & 포인트안내 2 | 25843 | 2024.11.04 | |
공지 | URL만 붙여넣으면 끝! 임베드 기능 | 20425 | 2025.01.21 | |
10639 | 일반 | Synology의 4 베이 NAS 장비 "DiskStation DS416j" | 1456 | 2016.02.08 |
10638 | 일반 | 태블릿 PC의 충전을하면서 주변 기기를 사용할 수있는 OTG 지원 USB 허브 | 1434 | 2016.02.08 |
10637 | 일반 | 카페베네 상장 난항에 투자자 눈물 | 776 | 2016.02.15 |
10636 | 일반 | 주식, 욕심은 화를 부르고. 그 화는 고스란히 가족들에게 짜증을 부릴겁니다 | 789 | 2016.02.22 |
10635 | 일반 | 원익IPS 추천합니다 | 676 | 2016.02.22 |
10634 | 일반 | 장이 너무 안좋네요 ㅜㅜ | 707 | 2016.02.22 |
10633 | 일반 | 주식투자와 관련된 주식명언 | 999 | 2016.02.22 |
10632 | 일반 | i5-6600 i5-6500 비교 1 | 1434 | 2016.02.22 |
10631 | 일반 | ssd좀봐주세요 2 | 906 | 2016.02.27 |
10630 | 일반 | 크라운제과 어떻게 보시나요? | 458 | 2016.02.28 |
10629 | 일반 | 흑자예상하며 기다린보람이 있군 | 471 | 2016.02.28 |
10628 | 일반 | 세계 주식 주요 지수 보는곳 입니다.모르시는분들을 위해 | 646 | 2016.02.28 |
10627 | 일반 | 한 2월 말쯤 총선테마가 시작될걸로 예상합니다. | 562 | 2016.02.28 |
10626 | 일반 | 대중관계 악화로 중국에서 돈버는 기업들 급락이네요 | 684 | 2016.02.28 |
10625 | 일반 | 주식 생초보인데 알려주실수 있으신가요? | 515 | 2016.02.28 |
10624 | 일반 | 11시정도만 잘 넘기면 될거같은데.. | 478 | 2016.02.28 |
10623 | 일반 | 요즘 한종목에 꽂혀서 분할매수하는데요. | 565 | 2016.02.28 |
10622 | 일반 | 본인 명의로 핸드폰 두개 개설 하면 문제 생기나요? 1 | 1154 | 2016.03.01 |
10621 | 일반 | 단말기대금 일시불납 가능한가요? 1 | 781 | 2016.03.05 |
10620 | 일반 | 노트4 배터리 공유?? 1 | 1749 | 2016.03.05 |
10619 | 일반 | 금호타이어 어떻게 보시나요? | 650 | 2016.03.05 |
10618 | 일반 | 해외에서 사용하던 도메인을 구입했는데 헉.. | 568 | 2016.03.09 |
10617 | 일반 | 축구 페널티킥 선방 탑10 | 469 | 2016.03.12 |
10616 | 일반 | SSD의 성능을 유지하기위한 유지 관리 기술 | 1068 | 2016.03.15 |
10615 | 일반 | 저렴한 Skylake 버전 Xeon 마더보드 'GA-X150M-PRO ECC」 | 874 | 2016.03.15 |
10614 | 일반 | G5 vs S7 1 | 626 | 2016.03.18 |
10613 | 일반 | 스테레오믹스 소리가 안납니다 1 | 1104 | 2016.03.19 |
10612 | 일반 | 스피커를 항상 켜 놓는데요. 노이즈??? 소리가 납니다. 1 | 849 | 2016.03.19 |
10611 | 일반 | M2 메모리 추천 1 | 911 | 2016.03.19 |
10610 | 일반 | 모니터 단자 HDMI, DP & 오디오 관련 문의 1 | 865 | 2016.03.19 |