安装完之后呢,我们要在上面开发程序,但是首先它的环境得能用,那样我们才能开发项目。
1-》C:\Windows\System32\drivers\etc\hosts 这个文件是对于访问站点域名解析的文件,我们可以写上自己项目的 域名: 例如-》127.0.0.1 www.***.com 完事保存文件。
2-》D:\wamp\bin\apache\apache2.2.8\conf\httpd.conf apache配置文件(根据各自安装的目录),我们只用到一项(对于配置域名) #Include conf/extra/httpd-vhosts.conf 把这句话前面的#去掉,OK
3-》D:\wamp\bin\apache\apache2.2.8\conf\extra\httpd-vhosts.conf 添加我们本地项目域名实际位置。
例如:
<VirtualHost *:80>
DocumentRoot “D:/wamp/www/game/”
ServerName gamegogle.com
<VirtualHost *:80>
DocumentRoot “D:/wamp/www”
ServerName localhost
注意路径的斜线!!!
第二项和第三项保存后,是需要重启服务的(每次)。