phpstudy更改根目录后,出现Forbidden You don't have permission to access / on this server.

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>


  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值