wampServer配置虚拟主机

1、首先在apache的httpd.conf的文件中开启虚拟主机功能(搜索vhosts即可);

2.将Directory更改为Allow from all

3、如果报错说禁止访问。将httpd-vhosts.conf的DocumentRoot更改为你apache的工作目录

4.然后再httpd-vhosts.conf的最后添加一个虚拟配置信息,例如

<VirtualHost *:80>
    DocumentRoot "D:/PHP-Soft/wamp/wamp/www/Zend/votesys/public/"
    ServerName votesys.com
 DirectoryIndex index.php
 <Directory />
 Options FollowSymLinks
 AllowOverride None
 Order allow,deny
 Allow from all
 </Directory>
</VirtualHost>

5、在C盘的hosts中添加域名。

posted @ 2012-11-20 00:09  wcp_spring  阅读(219)  评论(0)    收藏  举报