- 论坛徽章:
- 0
|
个人在根目录下新建了目录myweb做测试,用于DocumentRoot,里面存放了在安装目录下的htdocs里的所有文件,我拷贝过去的,目录和文件权限为755,并且httpd_user_content_t(不过当前情况下我的SELinux关闭掉了,这个属性存在与否应该也就无所谓了),而且没有防火墙设置,/myweb/目录及其下所有文件组:所有者为nobody:nobody。
对httpd.conf我修改了以下几个参数:
DocumentRoot "/myweb/"
User nobody
Group nobody
DirectoryIndex index.php index.html index.htm
基于以上设置重启 了Apache服务器和系统都没法正常访问index.php或者index.html,错误消息如下:
Forbidden
You don't have permission to access / on this server.
Most likely causes:
This website requires you to log in.
What you can try:
Go back to the previous page.
More information
This error (HTTP 403 Forbidden) means that this program was able to connect to the website, but it does not have permission to view the webpage.
请大侠们帮忙解决下此问题,谢谢! |
|