当前位置: 首页 > 图文教程 > 服务器 > Linux服务器 > Apache 多站点虚拟主机配置方法

Linux服务器
routeros的简单使用说明
ROS基本的设置向导之一
ROS基本的设置向导之二
ROS基本的设置向导之三
ROS基本的设置向导之四
使用ROS过滤网址和关键字
MikroTikRouterOS简介
RouterOS双线负载均衡
RouterOS的详细的设置方法
利用RouterOSVRRP配置路由器热备份
ROS专业企业软件路由防火墙功能介绍
软路由Routeros安装经典实例
Routeros2.96网通和电信策略路由表
一个完整的ftp远程批量shell
防止邮件服务器被滥用
Linux对象存储文件系统的技术架构研究
apache中禁止mp3试听
routeros端口映射方法
如何用ROUTEROS封闭P2P类软件
全面解决ROUTEROSIP限速问题

Linux服务器 中的 Apache 多站点虚拟主机配置方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-04   浏览: 263 ::
收藏到网摘: n/a

Apache 多站点虚拟主机配置方法, 有这类需要的朋友可以参考下。 修改配置文件 conf/httpd.conf
1.加入下面两句
NameVirtualHost *:80
Include conf/vhosts
2.在conf目录中建立vhosts目录
然后在 vhosts 目录下面建立相应的站点配置文件
如建立 hhj.ruanchen.com.conf 文件
内容:
复制代码 代码如下:

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.hhj.ruanchen.com
ServerAlias hhj.ruanchen.com
DocumentRoot "F:\wwwroot\hhj.ruanchen.com"
DirectoryIndex index.html index.htm index.php
ErrorLog logs/hhj.ruanchen.com-error_log.log
CustomLog logs/hhj.ruanchen.com-access_log.log common
<Directory "F:\wwwroot\hhj.ruanchen.com">
AllowOverride All
Options FollowSymLinks
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>

3.重启apache服务