禁止您无权访问此服务器上的/ music-server /

时间:2015-11-08 16:29:04

标签: wamp

我安装了wamp 2.5并创建了一个新的alis名称music-server。但是当我打开http://localhost/并在你的别名中点击它的名字时 此错误显示:

Forbidden

You don't have permission to access /music-server/ on this server.

Apache/2.4.9 (Win64) PHP/5.5.12 Server at localhost Port 80

music-server.conf的内容

Alias /music-server/ "c:/music-server/" 

<Directory "c:/music-server/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
    Order allow,deny
Allow from all
</Directory>

别名文件夹:

enter image description here

1 个答案:

答案 0 :(得分:0)

当您使用Apache 2.4时,别名定义包含Apache 2.2语法。

Alias也不应该有一个斜杠。

所以尝试将其改为此

Alias /music-server "c:/music-server/" 

<Directory "c:/music-server/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Require local
    # Only use if you actually want to be accessible from the universe
    #Require all granted
</Directory>