配置一下虚拟主机。开启虚拟主机后就打开Apache文件夹里的\conf\extra\下的httpd-vhosts.conf文件,在这个文件的最后面加代码(注意下面的代码还需要改动一下路径为你的网站根目录的路径,然后重启一下就可以了,如果不成功,记得关闭防火墙):

<VirtualHost 192.168.1.112:80>

DocumentRoot "D:/web/www"

ServerName localhost

<Directory "D:/web/www">

Options Indexes FollowSymLinks

DirectoryIndex index.html index.php

AllowOverride all

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

注意:修改本机局域网IP,还有自己项目根目录