Apache配置虚拟目录,以及各种操作
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配置虚拟目录,以及各种操作的更多相关文章
- Apache配置虚拟目录+Zend Studio访问
1 概述 Apache配置虚拟目录,然后可以通过Zend Studio的工程去访问,只需要修改Apache的httpd.conf文件. 2 修改httpd.conf 找到Apache安装目录下的htt ...
- PHP学习笔记:APACHE配置虚拟目录、一个站点使用多域名配置方式
我用的是xmapp lite2016的集成包,配置虚拟目录教程如下: 找到httpd-vhosts.conf这个文件,这个文件一般是在xampp\apache\conf\extra这个路径下面,找不到 ...
- Apache配置虚拟目录和多主机头
呃,相当古老的话题了,不过网上的资料实在是太坑爹,无奈只能自己动手做个备忘了...这里不提虚拟目录和主机头的区别了,不懂得童鞋去面壁思过吧 多个虚拟目录 首先把Apache安装到D:\Program ...
- apache配置--虚拟目录
apache在httpd-vhosts.conf中 配置二级域名或者泛域名: <VirtualHost *:80> ServerAdmin 846606478@qq.com D ...
- apache 配置虚拟目录
#注释掉apache默认的网站目录地址 #DocumentRoot "c:/Rrogram Files/Apache/htdocs" #配置一个虚拟目录 <ifModule ...
- apache配置虚拟目录
#虚拟目录配置 <IfModule dir_module> DirectoryIndex index.html index.htm index.php Alias /htdocs &quo ...
- windows下面apache配置虚拟目录(测试使用,发布网站不建议目录访问)
windows下面是这样简单设置 1 Apache虚拟目录: 针对某一目录可以这么设置: Alias /aidd2008 "D:/php/web/aidd2008" <Dir ...
- apache 配置网站目录,虚拟目录,新端口
1 配置网站目录,以ubuntu为例 1)打开apache的默认配置文件夹:cd /etc/apache2/sites-available 2)打开配置文件,本机为sudo vi 000-defau ...
- apache的虚拟目录的配置
第一步:在httpd.conf底部添加以下代码.表示添加虚拟目录 1 <IfModule dir_module> #direcotory相当于是欢迎页面 DirectoryIndex in ...
随机推荐
- 【jsonp】
function handleResponse(response) { alert("You’re at IP address " + response.ip + ", ...
- 【转】java枚举类型enum的使用
原文网址:http://blog.csdn.net/wgw335363240/article/details/6359614 java 枚举类型enum 的使用 最近跟同事讨论问题的时候,突然同事提到 ...
- Python日期时间函数处理
所有日期.时间的 api 都在datetime模块内. 1 日期的格式化输出 datetime => string import datetime now = datetime.datetime ...
- [MySQL-1] mysql error 1101 blob/text column can't have a default value
在MySQL Query Browser上创建一个含有TEXT类型的字段,创建不成功,报错:mysql error 1101 blob/text column can't have a default ...
- 关于.jar的文件在cmd中无法连接数据库的问题
我使用一个.jar的文件,想在cmd中以“java -jar *.jar”的格式运行,方便system.println()一些信息,该jar包中包含数据库连接内容,在我关闭comodo防火墙和wind ...
- JPEG最优压缩参数试验【光影魔术手VS Image Optimizer】
样本数量:100张(1MB-2.6MB)旅游照 样本大小:157MB 156.44 样本尺寸:3M(204 ...
- NOIP2012 Vigenère 密码
1.Vigenère 密码 (vigenere.cpp/c/pas) [问题描述] 16 世纪法国外交家 Blaise de Vigenère 设计了一种多表密码加密算法——Vigenère 密码.V ...
- 深度学习多机多卡解决方案-purine
未经允许请不要转载,原作者:zhxfl,http://www.cnblogs.com/zhxfl/p/5287644.html 目录: 一.简介 二.环境配置 三.运行demo 四.硬件配置建议 五. ...
- HW6.17
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- CDH CM安装及简单群集部署测试
前吃人的故事开始了,金钱是如何吃人的呢?我在想ing,还没想通,一起吧,哈哈: 入题,别胡扯,误人子弟!!!! CM@@!!!!!!....................., 先来张monitor ...