找到apache配置文件:
虚拟主机可以配置在vhosts.conf:
也可以配置在:
但前提是主配置文件引入了这两个配置(httpd.config文件):
vhosts.conf 或 httpd-vhosts.conf中配置虚拟主机:
修改hosts文件(线上是DNS域名解析)(C:WindowsSystem32driversetc):
phpstudy配置:
其他选项菜单->站点域名管理
修改hosts文件