Chinaunix

标题: 请教:在RedHat AS4中,如何修改DocumentRoot? [打印本页]

作者: redful    时间: 2008-11-10 08:40
标题: 请教:在RedHat AS4中,如何修改DocumentRoot?
各位高手:
      我在RedHat Linux AS4中配置Apache服务器时,我想把DocumentRoot由原来的/var/www/html 修改为 /www/html。重启httpd服务后,用ie浏览时,总是出现Apache的测试页(我已经在/www/html下放置了index.html文件)。不知道为什么?请您指教!!
作者: chenyx    时间: 2008-11-10 08:58
看看apache 的日志
作者: flycentos    时间: 2008-11-10 09:01
把DocumentRoot由原来的/var/www/html 修改为 /www/html。重启httpd服务后
作者: MichaelBibby    时间: 2008-11-10 09:09
出现测试页是因为目录下没有索引文件(index.php, index.htm, index.html),而 RH 里默认将这样的页面重定向到测试页面了。

具体请打开 /etc/httpd/conf.d/welcome.conf 文件。
要让它不显示测试页,将这个 welcome.conf 文件删除即可。
作者: flycentos    时间: 2008-11-10 10:18
原帖由 MichaelBibby 于 2008-11-10 09:09 发表
出现测试页是因为目录下没有索引文件(index.php, index.htm, index.html),而 RH 里默认将这样的页面重定向到测试页面了。

具体请打开 /etc/httpd/conf.d/welcome.conf 文件。
要让它不显示测试页,将这个 ...


同意楼上观点!测试通过!
作者: redful    时间: 2008-11-10 16:15
标题: 回复 #4 MichaelBibby 的帖子
谢谢您的指点。
在把/etc/httpd/conf.d/welcome.conf 文件删除,并在/www/html目录下放置了index.html文件后,再用ie看出现以下提示:
Forbidden
You don't have permission to access / on this server.

在error_log中显示:
[Mon Nov 10 16:06:20 2008] [error] [client 192.168.0.1] (13)Permission denied: access to /index.html denied

接下来我该怎么办?

[ 本帖最后由 redful 于 2008-11-10 16:17 编辑 ]




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2