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

Linux服务器
用Ubuntu做WEB服务器相关设置
使用Linux的rsync命令实现 多服务器镜像同步
Linux环境下Apache与Tomcat共存
Linux下简单的DNS实例一则
linux系统SendMail详细配置
实现Linux操作系统下DNS服务器的搭建
使用nbspNginxnbsp提升网站访问速度
使用awstats分析Nginx的访问日志
Linux网络中DHCP和DNS服务快速整合
Nginx负载均衡搭建胜过Apache十倍
Linux应用 DHCP服务器的安装和故障排除
ubuntu一步架设ftp服务器图文讲解
DHCP概述及Linux DHCP服务器的配置
Linux集群技术中的热点---虚拟技术
Linux操作系统的防火墙配置:基础篇
Linux DHCP服务器的配置
4步用XAMPP快速搭建LAMP环境
简略讲解对 Linux 服务器的四种入侵级别
浅谈Linux优化及安全配置的个人体会
解读Linux文件权限的设置方法

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-04   浏览: 237 ::
收藏到网摘: 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服务