环境:
win 8.1
xmapp 3.2.1
1.httpd-vhosts.conf(xampp\apache\conf\extra\httpd-vhosts.conf)文件末尾追加
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.comDocumentRoot "H:/template"
<Directory "H:/template">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
# ErrorLog "logs/dummy-host.example.com-error.log"
# CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
2.hosts(C:\WINDOWS\system32\drivers\etc\HOSTS)文件末尾追加
127.0.0.1 dummy-host.example.com
3.启动apache,访问http://dummy-host.example.com/就可以啦。