apache配置虚拟目录:

打开并创建虚拟目录的步骤如下:

# Virtual hosts

# Include conf/extra/httpd-vhosts.conf

去掉conf/http.conf文件中:

#Include conf/extra/httpd-vhosts.conf

前面的"#" (实际上是去掉注释) ,

若果想要配置多个虚拟目录的话,在httpd.conf中搜索“ NameVirtualHost ” ,如果没有的话加上一句:NameVirtualHost *:80

NameVirtualHost *:80
#NameVirtualHost localhost:8001
<VirtualHost *:80>
 ServerName *
 DocumentRoot "E:/APMserv/APMServ5.2.6/www/htdocs"
<Directory "E:/APMserv/APMServ5.2.6/www/htdocs">
 Options FollowSymLinks IncludesNOEXEC Indexes
 DirectoryIndex index.html index.htm default.htm index.php default.php index.cgi default.cgi index.pl default.pl index.shtml
 AllowOverride None
 Order Deny,Allow
 Allow from all
</Directory>
</VirtualHost>

然后若conf下面没有extra/http-vhosts.conf这个文件则创建,最后在里面添加如下代码:

<VirtualHost *:80>
   ServerAdmin  zhangpengdzs@adsit.cn
   DocumentRoot "E:\APMserv\APMServ5.2.6\www\htdocs\php\WeiXinApp\LivingartistApp\www"
   ServerName my.phpwxapp.com
   # This should be omitted in the production environment
   SetEnv APPLICATION_ENV development
   <Directory "E:\APMserv\APMServ5.2.6\www\htdocs\php\WeiXinApp\LivingartistApp\www">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride All
       Order allow,deny
       Allow from all
   </Directory>   
</VirtualHost>

<VirtualHost *:80>
   ServerAdmin  zhangpengdzs@adsit.cn
   DocumentRoot "E:\APMserv\APMServ5.2.6\www\htdocs\solomo\www\test\php"
   ServerName my.phptest.com
   # This should be omitted in the production environment
   SetEnv APPLICATION_ENV development
   <Directory "E:\APMserv\APMServ5.2.6\www\htdocs\solomo\www\test\php">
       Options Indexes MultiViews FollowSymLinks
       AllowOverride All
       Order allow,deny
       Allow from all
   </Directory>   
</VirtualHost>

表示添加了  my.phpwxapp.com   和 my.phptest.com 两个虚拟域名,最后在 系统C盘下面找到hosts文件,

在里面添加:

127.0.0.1 my.phpwxapp.com

127.0.0.1       my.phptest.com

最后重启Apache服务应该就可以了。

Apache多站点多IP配置:http://blog.chinaunix.net/uid-18933439-id-2808715.html

Apache配置虚拟目录,以及各种操作的更多相关文章

  1. Apache配置虚拟目录+Zend Studio访问

    1 概述 Apache配置虚拟目录,然后可以通过Zend Studio的工程去访问,只需要修改Apache的httpd.conf文件. 2 修改httpd.conf 找到Apache安装目录下的htt ...

  2. PHP学习笔记:APACHE配置虚拟目录、一个站点使用多域名配置方式

    我用的是xmapp lite2016的集成包,配置虚拟目录教程如下: 找到httpd-vhosts.conf这个文件,这个文件一般是在xampp\apache\conf\extra这个路径下面,找不到 ...

  3. Apache配置虚拟目录和多主机头

    呃,相当古老的话题了,不过网上的资料实在是太坑爹,无奈只能自己动手做个备忘了...这里不提虚拟目录和主机头的区别了,不懂得童鞋去面壁思过吧 多个虚拟目录 首先把Apache安装到D:\Program ...

  4. apache配置--虚拟目录

    apache在httpd-vhosts.conf中 配置二级域名或者泛域名: <VirtualHost *:80>    ServerAdmin 846606478@qq.com    D ...

  5. apache 配置虚拟目录

    #注释掉apache默认的网站目录地址 #DocumentRoot "c:/Rrogram Files/Apache/htdocs" #配置一个虚拟目录 <ifModule ...

  6. apache配置虚拟目录

    #虚拟目录配置 <IfModule dir_module> DirectoryIndex index.html index.htm index.php Alias /htdocs &quo ...

  7. windows下面apache配置虚拟目录(测试使用,发布网站不建议目录访问)

    windows下面是这样简单设置 1 Apache虚拟目录: 针对某一目录可以这么设置: Alias /aidd2008 "D:/php/web/aidd2008" <Dir ...

  8. apache 配置网站目录,虚拟目录,新端口

    1 配置网站目录,以ubuntu为例 1)打开apache的默认配置文件夹:cd /etc/apache2/sites-available 2)打开配置文件,本机为sudo vi  000-defau ...

  9. apache的虚拟目录的配置

    第一步:在httpd.conf底部添加以下代码.表示添加虚拟目录 1 <IfModule dir_module> #direcotory相当于是欢迎页面 DirectoryIndex in ...

随机推荐

  1. Java [leetcode 24]Swap Nodes in Pairs

    题目描述: Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1-& ...

  2. Oracle Data Guard

    DG 是 Oracle Data Guard 的简称.也就是Oracle11g的 数据卫士. 由于在工作中 Oracle和 SQL SERVER2008 同时都需要维护管理.给我的感觉这里的 DG 其 ...

  3. Spring入门之HelloSpring

    Spring描述: -轻量级:Spring是非侵入式的-基于Spring开发的应用中的对象可以不依赖于Spring的API -依赖注入(DI---dependency injection,IOC) - ...

  4. HDU 5534 Partial Tree 完全背包

    一棵树一共有2*(n-1)度,现在的任务就是将这些度分配到n个节点,使这n个节点的权值和最大. 思路:因为这是一棵树,所以每个节点的度数都是大于1的,所以事先给每个节点分配一度,答案 ans=f[1] ...

  5. FOJ 1608 Huge Mission 线段树

    每个节点维护一个最小值,更新发现如果大于最小值,直接向下更新.速度还可以.. #include<cstdio> #include<algorithm> #include< ...

  6. MSP430看门狗

    其实430的看门狗,与51的大同小异,都是为了防止程序跑飞而出现不可预知的错误而专门设定的,所以说,看门狗的应用,是项目马上要进行实际应用中必须要进行的一环,也是电子工程师必须掌握的一环,下面介绍一下 ...

  7. Inf2Cat, signability test failed.

    驱动开发真不是那么好玩的,折腾了几天,排除了几个错误,又有新的错误了. 错误    1    error -2: "Inf2Cat, signability test failed.&quo ...

  8. JDK1.5新特性(五)……Typesafe Enums

    援引 Typesafe Enums - This flexible object-oriented enumerated type facility allows you to create enum ...

  9. POJ 2955 Brackets 区间合并

    输出一个串里面能匹配的括号数 状态转移方程: if(s[i]=='('&&s[j]==')'||s[i]=='['&&s[j]==']')             dp ...

  10. 2015长春 HDU 5531 Rebuild

    题意:n个顶点组成的多边形能否形成正多边形? #include <cstdio> #include <cstring> #include <cmath> #incl ...