配置虚拟主机配置方法如下:
    1、修改C:\Windows\System32\drivers\etc此目录下的hosts文件。添加一个域名:127.0.0.1 www.tp.com (#要去掉)

    2、修改C:\wamp\bin\apache\apache2.4.17\conf\下的文件httpd.conf。
    把514行左右的Include conf/extra/httpd-vhosts.conf前面注释去掉。

    3、配置虚拟主机域名C:\wamp\bin\apache\apache2.4.17\conf\extra\httpd-vhosts.conf


    DocumentRoot “C:\wamp\www\tp5\public”
    ServerName www.tp.com

    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

    4、重启apache。