WAMP: You don't have permission to access on this server.

新安装的 WAMP ,在其他电脑访问时,会出现 403错误:

1
2
Forbidden 
You don't have permission to access on this server.

解决办法:

在安装目录 盘符:\wamp64\bin\apache\apache2.4.23\conf\extra 中找到 httpd-vhosts.conf文件:

1
2
3
4
5
6
7
8
9
VirtualHost *:80>
ServerName localhost
DocumentRoot d:/wamp64/www
<Directory "d:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

修改为:

1
2
3
4
5
6
7
8
9
VirtualHost *:80>
ServerName localhost
DocumentRoot d:/wamp64/www
<Directory "d:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>