配置apache虚拟主机vhost
1 .首先在D:\wamp\bin\apache\Apache2.2.21\conf找到httpd.conf文件打开然后大概在460多行找到
去掉#,然后就是下面的情况
Include conf/extra/httpd-vhosts.conf
2. 然后在打开D:\wamp\bin\apache\Apache2.2.21\conf\extra中的httpd-vhosts.conf文件
在文件的末尾加上
<VirtualHost *:80>
ServerAdmin webmaster@www.alimal.net
DocumentRoot "d:/wamp/www/web"
ServerName www.alimal.net
ErrorLog "logs/www.alimal.net-error.log"
CustomLog "logs/www.alimal.net-access.log" common
</VirtualHost>
3 最后打开C:\Windows\System32\drivers\etc中的hosts文件
在文件的最后面把刚才定义的域名给指定一下
127.0.0.1 www.alimal.net
这样就OK了,纯属个人见解
The longest journey begins with the first step