虚拟机解析域名命令:只要5步简单配置本地虚拟主机的域名
虚拟机解析域名命令:只要5步简单配置本地虚拟主机的域名<VirtualHost *:80>去掉前边的#C:\wamp64\bin\apache\apache2.4.17\conf\httpd.conf# Virtual hostsInclude conf/extra/httpd-vhosts.conf
1.打开hosts文件 添加一个新的域名C:\Windows\System32\drivers\etc
添加
例如:127.0.0.1www.guoqing.com
::1www.guoqing.com
2.修改apache的配置文件C:\wamp64\bin\apache\apache2.4.17\conf\httpd.conf
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
去掉前边的#
3.C:\wamp64\bin\apache\apache2.4.17\conf\extra\httpd-vhosts.conf<VirtualHost *:80>
ServerName www.guoqing.com
DocumentRoot c:/wamp64/www/guoqing
<Directory "c:/wamp64/www/guoqing/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
4.重启服务器5.在www目录下新建一个目录