본문 바로가기
카테고리 없음

httpd configuration on Mac OS (Apple silicon chip, M1)

by 조율러 2022. 5. 26.

* virtual host 설정, hosts 파일 수정 후 접속했지만

Forbidden(HTTP status 403)
You don't have permission to access this resource.

메세지 나옴

=> apache가 해당 directory에 대해서 접근을 제어하는 경우 였음
원하는 Directory만 허용할 수 있는 설정

참고 문헌
1) 아파치 공식 문서
https://httpd.apache.org/docs/2.4/ko/mod/core.html#directory

 

core - Apache HTTP Server Version 2.4

This directive enables operating system specific optimizations for a listening socket by the Protocol type. The basic premise is for the kernel to not send a socket to the server process until either data is received or an entire HTTP Request is buffered.

httpd.apache.org

//전체설정
<Directory /> //-> 모든 디렉토리에 대해서
    AllowOverride All
    Require all denied //-> 모든 접근 제한(거부)
</Directory>

//특정 directory 설정
<Directory "/Users/tune/Projects/sources/CWC_APP">
    AllowOverride All
    Options FollowSymLinks //-> 심볼릭 링크 수정
    Require all granted //-> 모든 접근 승인
</Directory>

기본적으로 모든 디렉토리에 대해서 접근을 막고
특정 디렉토리에 대해서만 접근을 허용한다.

댓글