'selinux'에 해당되는 글 1건

  1. 2006.10.18 Apache에서 디렉토리임에도 DocumentRoot 에러 날 때
Apache 웹서버 설정.
당연히 디렉토리를 만들었고 퍼미션도 701~707 까지  다 줘봤는데, 아래와 같은 에러가 나더라.

Starting httpd Syntax error on line 267 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory
                                                                              [FAILED]

OTL...

구글링해본 결과 원인은 SELinux ...아이고 -_-
이놈에 보안정책이 뭔지

chcon -R -t httpd_user_content_t [디렉토리]


해법 출처 :
http://www.superuser.co.kr/home/superuserboard/view.html?id=1628&code=apache&start=0&position=

---

추가 :

403 forbidden 에는..

setsebool -P httpd_enable_homedirs on

(setsebool 명령이 없으면 yum -y install policycoreutils-python )

출처 : http://stackoverflow.com/questions/14786881/apache-restart-causes-documentroot-must-be-a-directory-even-though-it-is-a-dire


Posted by freezn