1、找到apache目录下的conf下的extra下的httpd-vhosts.conf虚拟主机配置文件
将下面的代码复制粘贴到最下面:
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host2.example.com
# DocumentRoot "${SRVROOT}/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>
# ServerAdmin webmaster@dummy-host2.example.com
# DocumentRoot "${SRVROOT}/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>
编辑成如下代码:
<VirtualHost *:80>
DocumentRoot "F:\project"
ServerName www.thinkphp.com
DocumentRoot "F:\project"
ServerName www.thinkphp.com