1. 设置hosts:进入C:\Windows\System32\drivers\etc,打开hosts文件,添加 127.0.0.1 zby.com
    xampp 本机设置虚拟域名zby.com
  2. 打开D:/xampp/apache/conf/extra打开http-vhosts.conf文件,设置
    DocumentRoot “D:/xampp/htdocs/”
    ServerName zby.com
    xampp 本机设置虚拟域名zby.com
  3. 重启xampp即可

相关文章: