zoukankan      html  css  js  c++  java
  • wamp2.5虚拟站点建立

    1. D:wampinapacheApache2.2.21conf 目录下打开httpd.conf修改以下几个地方。(软件安装在D盘)

    (1)178行DocumentRoot "E:/www/" //修改网站路径

    (2)192行   #Deny from all

                  Allow from all   //允许所有用户访问

    (3)206行  <Directory "E:/www/"> //修改网站路径

    (4)234行    #Deny from all

                   Allow from all  //允许所有用户访问

    (5)468行   #Include conf/extra/httpd-vhosts.conf //去掉前面的#号

    2 D:wampinapacheApache2.2.21confextra下httpd-vhosts.conf文件复制如下文件到最后面(27-34行),并修改其中三行。包括盘幅和域名。

    <VirtualHost *:80>

        ServerAdmin webmaster@dummy-host.example.com

        DocumentRoot "c:/Apache2/docs/dummy-host.example.com"

        ServerName dummy-host.example.com

        ServerAlias www.dummy-host.example.com

        ErrorLog "logs/dummy-host.example.com-error.log"

        CustomLog "logs/dummy-host.example.com-access.log" common

    </VirtualHost>

    <VirtualHost *:80>

        ServerAdmin webmaster@dummy-host.example.com

        DocumentRoot "E:/www/study"

        ServerName styudy.com

        ServerAlias www.study.com

        ErrorLog "logs/dummy-host.example.com-error.log"

        CustomLog "logs/dummy-host.example.com-access.log" common

    </VirtualHost>

    3. C:WindowsSystem32driversetc 目录下hosts 最下面加入如下语句

    127.0.0.1       study.com

    127.0.0.1       www.study.com  //使域名与ip对应  (此处域名与2中的设置名字相同)

       

     

  • 相关阅读:
    【C#高级】泛型(一)
    【C#】RGB转CMYK
    C#读写Excel
    H5+MUI上传文件
    完整登录流程包含第三方登录,很详细值得推荐
    [MVC]多文件、超大文件上传
    [SQL Server] 无法连接到本地数据库
    “System.OutOfMemoryException”类型的异常在 mscorlib.dll 中发生,但未在用户代码中进行处理
    MVC缓存(二)
    MVC缓存(一)
  • 原文地址:https://www.cnblogs.com/ytu2010dt/p/4979418.html
Copyright © 2011-2022 走看看