1.首先在apache的httpd.conf文件中开启服务器里面的虚拟主机apache
Include conf/extra/httpd-vhosts.conf服务器
2.在apache vhost.conf文件配置虚拟主机 ide
<VirtualHost *:80>
DocumentRoot "路径"
ServerName 域名
ServerAlias 别名 <Directory "路径">
Options Indexes FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>域名
3.在c盘hosts文件修改文件io
127.0.0.1 域名配置