zoukankan      html  css  js  c++  java
  • apache多端口映射

    我使用一个apache服务器。在我的apache根目录下有这么几个网站,如Test、Child这两个文件夹,也就是两个网站。我想这 样,当我访问http://localhost的时候就访问Test,当我访问http://localhost:8080的时候就访问Child。

    我们需要配置apache。讲apache文件夹下的conf中的httpd.conf打开,搜索Include conf/extra/httpd-vhosts.conf,将前面的注释去掉。再打开conf/extra/httpd-vhosts.conf文件, 清除里面的内容,这样写道:

    NameVirtualHost *:8080
    <VirtualHost *:8080>
    ServerName localhost
    ServerAlias localhosts
    DocumentRoot D:/development/www/Child
    </VirtualHost>
    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerName localhost
    ServerAlias localhost
    DocumentRoot D:/development/www/Test
    </VirtualHost>

    重启apache服务器就ok了。

    http://maosuhan.iteye.com/blog/946506

  • 相关阅读:
    String类
    try catch异常捕获
    while循环语句
    编程中穷举法的运用
    for循环例题
    编程中的 if ()else() 语句
    代位符
    运算符_及_运算符优先级
    C#中的类型转换
    Asp.net基础知识
  • 原文地址:https://www.cnblogs.com/keepfocus/p/2348919.html
Copyright © 2011-2022 走看看