Apache 服务器 虚拟机 vhost 配置 域名 方法 httpd conf
1、编辑 C:\Windows\System32\drivers\etc\hosts
127.0.0.1 localhost 127.0.0.1 ttyun.test
2、修改apache配置文件httpd.conf 去掉#
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
3、
<VirtualHost *:80> DocumentRoot "D:/phpStudy/WWW" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "D:/phpStudy/WWW/tp/public" ServerName tp5.com </VirtualHost>