conf/extar/httpd-vhosts.conf 文件中写入以下配置, apache 即可识别
<VirtualHost *:80> DocumentRoot "E:xampphtdocszergpublic" ServerName z.cn </VirtualHost>
<VirtualHost *:80>
DocumentRoot "E:xampphtdocs"
ServerName localhost
</VirtualHost>
apache httpd.conf 文件, 解除注释
Include conf/extra/httpd-vhosts.conf
LoadModule rewrite_module modules/mod_rewrite.so
进行注释
#ServerName localhost:80
C:Windowssystem32driversetchosts 文件中写入以下配置, 使本机浏览器能够识别
127.0.0.1 z.cn