求教,apahce DocumentRoot目录改变后出现403错误
时间:2010-06-08
来源:互联网
如题,系统是Arch linux + apche2.2.15 + php5.3.2
修改apache的配置文件httpd.conf中下面两行
<Directory "/srv/http">
DocumentRoot "/srv/http"
不管改什么都会报错,注释掉php的相关行也是一样。
错误如下:(改变目录)
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Tue Jun 8 02:10:53 2010
Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 PHP/5.3.2 with Suhosin-Patch
还有一个问题,使用虚拟目录也会出现类似的错误。
增加:(httpd.conf)
# Alias
Include conf/extra/httpd-alias.conf
文件:(/etc/httpd/conf/extra/httpd-alias.conf)
# phpmyadmin
Alias /phpmyadmin /home/angei/htdocs/phpmyadmin
注:/home/angei/htdocs/phpmyadmin这个目录已经建立。
错误如下:(于上面的不完全一样)
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Tue Jun 8 02:14:29 2010
Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 PHP/5.3.2 with Suhosin-Patch
修改apache的配置文件httpd.conf中下面两行
<Directory "/srv/http">
DocumentRoot "/srv/http"
不管改什么都会报错,注释掉php的相关行也是一样。
错误如下:(改变目录)
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Tue Jun 8 02:10:53 2010
Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 PHP/5.3.2 with Suhosin-Patch
还有一个问题,使用虚拟目录也会出现类似的错误。
增加:(httpd.conf)
# Alias
Include conf/extra/httpd-alias.conf
文件:(/etc/httpd/conf/extra/httpd-alias.conf)
# phpmyadmin
Alias /phpmyadmin /home/angei/htdocs/phpmyadmin
注:/home/angei/htdocs/phpmyadmin这个目录已经建立。
错误如下:(于上面的不完全一样)
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Tue Jun 8 02:14:29 2010
Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.0a DAV/2 PHP/5.3.2 with Suhosin-Patch
作者: 残幽灵 发布时间: 2010-06-08
补充一下:
网上有人说是php.ini中的open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/没有把新目录加进去,加了还是同样的错误。
网上有人说是php.ini中的open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/没有把新目录加进去,加了还是同样的错误。
作者: 残幽灵 发布时间: 2010-06-08
You don't have permission to access the requested directory.
很明显,权限不够,chmod改下权限试试。
很明显,权限不够,chmod改下权限试试。
作者: c55050120 发布时间: 2010-06-08
读写权限的问题吧
看看apache用什么用户, http? www? www-data?
看看apache用什么用户, http? www? www-data?
作者: CnkknD 发布时间: 2010-06-08
引用:
作者: CnkknD
读写权限的问题吧
看看apache用什么用户, http? www? www-data? |
作者: 残幽灵 发布时间: 2010-06-08
很郁闷,改权限a+rwx,还是改属组http.http都无效。我直接该http.conf里的User和Group为自己的,问题解决…还好我是做开发用~
谁知道apache的目录权限怎么改,详细点的。arch默认的目录权限是:
[tuzi@archlinux ~]$ ls -l /srv
总用量 8
dr-xr-xr-x 2 root ftp 4096 2月 26 12:56 ftp
drwxr-xrwx 2 root root 4096 6月 8 02:20 http
用户,属主是root!
谁知道apache的目录权限怎么改,详细点的。arch默认的目录权限是:
[tuzi@archlinux ~]$ ls -l /srv
总用量 8
dr-xr-xr-x 2 root ftp 4096 2月 26 12:56 ftp
drwxr-xrwx 2 root root 4096 6月 8 02:20 http
用户,属主是root!
作者: 残幽灵 发布时间: 2010-06-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28