设置httpd.conf的DocumentRoot值为其他目录时出现“Document root must be a directory”的问题
来源:互联网 发布:淘宝左拦轮播图片尺寸 编辑:程序博客网 时间:2024/06/04 19:39
这是系统起了SELinux的策略。把目录或文件设成了 user_home_t类型,因此apache的进程没有权限,无法访问。
针对Apache的进程所使用的SELinux target policy规定了apache的进程只能访问httpd_sys_content_t类型的目录或文件。
解决办法:
使用ls -Z 查看文件(目录)的策略类型。
把目录或文件的策略类型改成 httpd_sys_content_t 就可以了。
# chcon -R -h -t httpd_sys_content_t /web
哈哈,又解决一问题,原帖链接忘记了,就不标上去了。
- 设置httpd.conf的DocumentRoot值为其他目录时出现“Document root must be a directory”的问题
- 设置httpd.conf的DocumentRoot值为其他目录时出现“Document root must be a directory”的问题
- httpd.conf中一旦修改DocumentRoot为其他的目录出现Forbidden
- DocumentRoot must be a directory 的解决办法
- WAMP的apache无法启动DocumentRoot must be a directory
- Document root must be a directory解决办法
- Document root must be a directory
- linux CentOs 权限导致的Apache - "DocumentRoot must be a directory"的解决方案
- Linux更改Apache网站目录出错:Document root must be a directory
- Windows更改Apache网站目录出错:Document root must be a directory
- mac下xampp出现DocumentRoot must be a directory报错
- 关于virtualBox中最小化安装CentOS7系统,更改httpd.conf中的DocumentRoot之后访问出现Forbidden的问题
- sudo出现sudo:must be setuid root问题的解决方法
- sudo出现sudo:must be setuid root问题的解决方法
- sudo出现sudo:must be setuid root问题的解决方法
- sudo出现sudo:must be setuid root问题的解决方法
- sudo出现sudo:must be setuid root问题的解决方法
- sudo出现sudo:must be setuid root问题的解决方法
- VC中radiobutton控件的用法
- Ajax.js.css.dojo利器Aptana
- Server.Transfer,Response.Redirect的区别
- 了解泛型
- 读佛体会——对佛的三个层次认识
- 设置httpd.conf的DocumentRoot值为其他目录时出现“Document root must be a directory”的问题
- Server.Transfer Response.Redirect的区别(二)
- 需求分析阶段如何与用户面谈的过程
- 显示ListUI中0的值
- 朴素的“阴阳”看“泡妞”
- 装修心得搜集
- #if defined(...)的含义
- 曾经看过的经典小说
- Java Socket通讯例子