Forbidden
You don't have permission to access / on this server.
在访问www.thh666.com以后,出现上面的错误提示,我研究了配置文件,发现以下问题,在配置文件vhots.conf中的:
<VirtualHost *:80>
DocumentRoot "D:\www"
ServerName www.thh666.com
ServerAlias
<Directory "D:\www">
Options FollowSymLinks ExecCGI//这个语句是www这个目录不允许访问
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "D:\www"
ServerName www.thh666.com
ServerAlias
<Directory "D:\www">
Options +Indexes +FollowSymLinks +ExecCGI//这个语句是www这个目录不允许访问
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost><hr>
在httpd.conf文件中,也需要把相应的内容改为上面的:
DocumentRoot "D:\WWW"
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI//这句跟上面一样,如使用Options FollowSymLinks +ExecCGI,就会出现:无法访问此网站
www.rcles.com 拒绝了我们的连接请求。
的错误错误提示。 AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
本文探讨了在尝试访问特定网站时遇到的Forbidden错误,并详细分析了Apache配置文件中的相关设置,特别是如何通过修改DocumentRoot和<Directory>部分来解决这一问题。

252

被折叠的 条评论
为什么被折叠?



