PHP本地域名解析

1.C:\WINDOWS\system32\drivers\etc\hosts

127.0.0.1       localhost
127.0.0.1       www.yizhongkj.com

2.E:\wamp\bin\apache\apache2.2.22\conf\extra\httpd.conf

# Virtual hosts

#Include conf/extra/httpd-vhosts.conf
修改为
# Virtual hosts
Include conf/extra/httpd-vhosts.conf

3.E:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf

最后加下面一段:

<VirtualHost *:80>

   ServerAdmin [email protected]

   DocumentRoot "E:/yizhongkj"

   ServerName www.yizhongkj.com

   <Directory "E:/yizhongkj">

       Options Indexes FollowSymLinks

       AllowOverride All

       Order allow,deny

       Allow from all

  </Directory>

</VirtualHost>

4.DW建立站点



你可能感兴趣的:(PHP,域名)