zoukankan      html  css  js  c++  java
  • wamp配置虚拟主机

    首先

    1  编辑httpd.conf,查找Include conf/extra/httpd-vhosts.conf,把前面注释符号“#”删掉。

    2  找到安装目录下wamp\bin\apache\Apache2.2.17\conf\extra 下 httpd-vhosts.conf这个文件

    3 把 里面的内容清空掉 换成下面的内容

    <VirtualHost 127.0.0.1:80>
        DocumentRoot E:/htdocs/dz
       ServerName www.dz.com
     DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml


    <Directory "E:/htdocs/dz">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    </VirtualHost>
    <VirtualHost 127.0.0.2:80>
        DocumentRoot E:/htdocs/cms
       ServerName www.dd.com

     DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml

    <Directory "E:/htdocs/cms">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    </VirtualHost>
    <VirtualHost 127.0.0.3:80>
        DocumentRoot E:/htdocs/dgcms
       ServerName www.dg.com

     DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml


    <Directory "E:/htdocs/dgcms">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    </VirtualHost>
    <VirtualHost 127.0.0.4:80>
        DocumentRoot E:/htdocs/phpmyadmin
       ServerName www.myadmin.com

     DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml


    <Directory "E:/htdocs/phpmyadmin">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>
    </VirtualHost>

    4 修改C:/WINDOWS/system3/drivers/etc/host这个文件,用记事本打开,加上如下内容:
      127.0.0.1  www.maypp.com
    5然后重启apache,在浏览器里面输入www.dd.com,看看访问到的内容  

  • 相关阅读:
    kubernetes 修改 可用端口号
    解决Mac下MX4手机无法连接adb问题之解决方案
    由于源码使用是cc++与oc混编导致Unknown type name 'NSString'
    Cocos2dx使用wxsqlite开源加密SQLite3数据库
    Cocos2dx网络读取图片
    解决Xcode删除文件后missing file警告
    WebRTC 配置环境
    Cocos2d-x 3.0 纹理
    Mac/Linux如何查找应用所安装路径
    设置Git用户信息
  • 原文地址:https://www.cnblogs.com/kakaxi/p/2092940.html
Copyright © 2011-2022 走看看