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 ...
随机推荐
- postgresql 行转列,拼接字符串
create table k_user ( op_id ) not null, op_name ) not null, password ) not null, real_name ) not nul ...
- pl/sql developer 编码格式设置
pl/sql developer编码格式设置 一.pl/sql developer 中文字段显示乱码 原因:因为数据库的编号格式和pl /sql developer的编码格式不统一造成的. 二. ...
- Java was started but returned exit code=13 C:\ProgramData\Oracle\Java\javapath\javaw.exe
---------------------------Eclipse---------------------------Java was started but returned exit code ...
- 深度学习-使用cuda加速卷积神经网络-手写数字识别准确率99.7%
源码和运行结果 cuda:https://github.com/zhxfl/CUDA-CNN C语言版本参考自:http://eric-yuan.me/ 针对著名手写数字识别的库mnist,准确率是9 ...
- Mac java环境配置
进入命令行 cd ~ touch .bash_profile vi .bash_profile 输入内容jdk变量配置内容: export JAVA_HOME=/Library/Java/JavaVi ...
- poj1848 Tree
.....是我多想了. 我想开f[][0~3],看到百度上的题解都是[0~2]的,我就改了 方程不是特别难想.. f代表最小代价 f[i][0]是子树有环过i f[i][1]是子树除了i都成环了 f[ ...
- AVD Snapshot功能
写程序的时候,经常会碰到:The application has stopped unexpectly… 有时候,会想对原来软件增加新功能或者修改bug.在eclipse修改后保存代码(注意,要保存所 ...
- 再次踩bug:遍历删除list(java.util.ConcurrentModificationException)
再次踩bug:遍历删除list(java.util.ConcurrentModificationException) 使用 List<Long> list = new ArrayList& ...
- Android实例-消息框(XE8+小米2)
方法一支持. 方法二与方法三都是三方单元,功能相同. 方法4与方法5报错,提示平台不支持. 第三方单元一: unit Android.JNI.Toast; // Java bridge class i ...
- A Tour of Go Map literals
Map literals are like struct literals, but the keys are required. package main import "fmt" ...