Wampserver虚拟机配置记录

来源:互联网 发布:淘宝马牌轮胎旗舰店 编辑:程序博客网 时间:2024/04/26 08:51

第一步

在http.conf 文件里面找到 ,开启 Virtual hosts

# Virtual hosts

Include conf/extra/httpd-vhosts.conf

第二步

在httpd-vhosts.conf文件添加如下内容

<VirtualHost *:80>    
    DocumentRoot "D:/wamp/www/m"     
    ServerName www.m.com
    ServerAlias www.m.com
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

第三步

在host文件里面 添加

127.0.0.1       www.m.com

重启apache

在浏览器输入 www.m.com 就能看到  "D:/wamp/www/m"     目录下面的 index.html/index.htm/index.php/index.asp/index.jsp/index.aspx

原创粉丝点击