oi622 发表于 2015-10-15 08:41:01

Apache配置虚拟主机

                      1、httpd.conf中,打开vhost(取消前面的“#”),注销DocumentRoot(取消前面的“#”)
2、httpd-vhosts.conf中输入
<VirtualHost 127.0.0.1>
DocumentRoot "F:/myWeb"
DirectoryIndex index.html index.htm index.php
<Directory "F:/myWeb">
options FollowSymLinks
Allowoverride None
order allow,deny
Allow from all
</Directory>
</Virtualhost>
3、hosts文件中输入
127.0.0.1    www.abc.net

4、重启apache
5、成功~


                   

页: [1]
查看完整版本: Apache配置虚拟主机