Re: [問題] service httpd start failed?
※ 引述《fillmore (.......................)》之銘言:
: 推 bobju:查httpd的log. 01/30 13:33
: → fillmore:error_log是空的 無錯誤 01/30 13:43
: 推 herolee:看系統日志/var/log/messages 01/30 14:32
: → fillmore:/var/log/messages無httpd相關錯誤 01/30 14:45
: 推 ago1414:Options FollowSymlinks 設定加進去看看 01/30 14:57
: httpd相關設定什麼都不用改
: 最後是把SELINUX關掉
: 就正常了
: 不知道牴觸了什麼安全性設定???
應該是你的/home/test/public_html的selinux security context不正確才導致問題
你可以ls -Z 看一下你的/home/test/public_html的security context
可能是
drwxrwxr-x root root root:object_r:user_home_t public_html
security context的格式是Identify:role:type
如果你的type不是httpd_sys_content_t就會被selinux擋住
此時可下chcon -R -t httpd_sys_content_t /home/test/public_html
來改變public_html的context即可
此時就算打開selinux你的httpd也能正常work
原因就出在你是在home dir產生public_html目錄 所以他type是user_home_t
如果直接在/var/www下make dir則type是httpd_sys_content_t就不會有問題
不過理論上selinux應該會在右上角出現黃色星星
然後有warning寫mislabeled然後提示你該如何處理才對
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.45.57.237
推
01/31 08:52, , 1F
01/31 08:52, 1F
→
02/04 08:38, , 2F
02/04 08:38, 2F
討論串 (同標題文章)