Apache 2.4 - 禁止访问:您无权访问此服务器上的/

时间:2015-05-21 16:55:04

标签: php apache

我一直试图找到解决方案,但没有用。

我正在使用wamp并运行apache 2.4。每当我尝试访问位于www / drupal / website目录中的文档时,我都会收到Forbidden错误。

我的 httpd.conf 文件具有以下配置:

for(char[] char1 : record){

我将其更改为以下内容但我没有运气使其正常工作。

<Directory />
    AllowOverride none
    Require all denied
</Directory>

#   onlineoffline tag - don't remove
    Require local
</Directory>

我也试过以下 - 同样的结果:

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
</Directory>

#   onlineoffline tag - don't remove
    Require all granted
</Directory>

我还尝试修改 vhosts.conf 。我的默认设置是:(我不知道为什么我有两次)

<Directory />
    #Options FollowSymLinks
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

我尝试将第一个vhost标记更改为:

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "c:/Apache24/docs/dummy-host2.example.com"
    ServerName dummy-host2.example.com
    ErrorLog "logs/dummy-host2.example.com-error.log"
    CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

知道我可能做错了什么吗?

非常感谢, 维拉德。

0 个答案:

没有答案