httpd-vhosts.conf
ServerName koastal.com ServerAlias www.koastal.com DocumentRoot D:\wamp64\vhosts\www Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local ServerName login.koastal.com DocumentRoot D:\wamp64\vhosts\login Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local
修改本机hosts
windows
C:WINDOWS/system32/drivers/etc/hosts
linux
vim /etc/hosts
在最后添加
127.0.0.1 www.koastal.com login.koastal.com
编写php代码进行测试
D:\wamp64\vhosts\www\index.php
Login
D:\wamp64\vhosts\login\index.php