- 论坛徽章:
- 0
|
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 |
|