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 域名配置