php wamp 配置虚拟主机
apeach配置;
还有是:E:\wamp\bin\apache\Apache2.4.4\conf 目录下有个 http.conf文件中,有一个需要取消注释,
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
需要去掉注释;
在E:\wamp\bin\apache\Apache2.4.4\conf\extra目录下,有个 httpd-vhosts.conf文件中,需要添加以下代码:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webrx@126.com
DocumentRoot "E:\work"
ServerName www.cup.com
DirectoryIndex index.html index.php
<Directory "E:\work">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
window host 文件配置;在文件夹 C:\WINDOWS\system32\drivers\etc下 host 文件中:
127.0.0.1 www.cup.com
在Dreamweaver 文件中,需要新建站点,mywork .....
以下是步骤:
新建服务器,本地网络:
服务器不要忘记 把测试勾上。
保存,这样站点就建好了。
在该站点下 ,可以写自己的代码了。
页:
[1]