代码语言:javascript复制
127.0.0.1 localhost
127.0.0.1 www.tp5.com
http-vhosts.conf搜这个文件就行了复制粘贴
代码语言:javascript复制<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "C:xampphtdocsxpublic"
ServerName www.tp5.com;
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
改域名后<<关机>>>,开启,在打开网页(www.tp5.com)