1,找到配置文件:httpd.conf
D:\wamp64\bin\apache\apache2.4.46\conf
大约在250行左右
<Directory />
AllowOverride none
Require all denied
</Directory>
修改为:
<Directory />
AllowOverride none
Require all granted
</Directory>
2,配置httpd-vhosts.conf
D:\wamp64\bin\apache\apache2.4.46\conf\extra
<VirtualHost *:80/myproject>
ServerName a.com
DocumentRoot C:/WampServer/www/myproject
<Directory "C:/WampServer/www/myproject">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168.1.4 服务器地址
Require ip 192.168.1.250 访问端地址
</Directory>
</VirtualHost>
3,访问端电脑修改hosts
C:\Windows\System32\drivers\etc
192.168.1.4 a.com
4,访问 a.com