首页 > 其他 > 详细

xampp多站点配置,最简洁方式

时间:2014-03-23 20:46:43      阅读:534      评论:0      收藏:0      [点我收藏+]

首先,下载安装官方最新版本的xampp,地址:点击

安装成功后,运行软件,点击Explorer.

bubuko.com,布布扣

会打开软件的安装目录,选择.\apache\conf\extra\httpd-vhosts.conf  ,打开。


添加如下内容:



<VirtualHost 127.0.0.2:80>
    ServerAdmin "127.0.0.2:80"  
    DocumentRoot "E:/wwwroot/xxx"
    ServerName 127.0.0.2
    ErrorLog "logs/xxx.log"
    CustomLog "logs/xxx.log" combined
</VirtualHost> 

DocumentRoot "E:/wwwroot"
<Directory "E:/wwwroot">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn‘t give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks Includes ExecCGI

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

,之后依次添加127.0.0.3,127.0.0.4,就直接复制

<VirtualHost 127.0.0.3:80>
    ServerAdmin "127.0.0.3:80"  
    DocumentRoot "E:/wwwroot/yyy"
    ServerName 127.0.0.3
    ErrorLog "logs/yyy.log"
    CustomLog "logs/yyy.log" combined
</VirtualHost> 

比较简单,而且不用再修改hosts文件了。

xampp多站点配置,最简洁方式,布布扣,bubuko.com

xampp多站点配置,最简洁方式

原文:http://blog.csdn.net/hudnc/article/details/21879589

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!