免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 267 | 回复: 0
打印 上一主题 下一主题

虚拟主机的 问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-10 19:21 |只看该作者 |倒序浏览
httpd.conf 中默认的 DocumentRoot  是 /var/www/html

我配置虚拟主机的时候:

<VirtualHost 222.37.134.49:80>
    DocumentRoot /www
    ErrorLog  logs/pintai-error_log
    CustomLog logs/pintai-access_log common
</VirtualHost>

我访问里面的文件a.txt 访问不了,这个目录 权限改成 777 也不行;提示权限问题

You don't have permission to access /a.txt on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.



只有指向 /var/www/ 下面的某个目录才可以,比如:
<VirtualHost 222.37.134.49:80>
    DocumentRoot /var/www
    ErrorLog  logs/pintai-error_log
    CustomLog logs/pintai-access_log common
</VirtualHost>
就可以,并且里面的文件都可以访问,请问各位大侠,是怎么回事?


httpd.conf 中的
User  apache
Group apache

,但我将 /www 改成 chown apache.apache www R  也不行 ,还是访问不了/www/a.txt
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP