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

Linux服务器
apache urlrewrite防盗链功能配置
实战 LAMP 服务器配置 完整篇
tomcat 5.5连接池配置,如何让工程为默认工程
搭建一个大型网站架构的实验环境(Squid缓存服务器篇)
Windows 配置Apache以便在浏览器中运行Python script的CGI模式
Apache 网站速度更快
ubuntu lighttpd+webpy (fastcgi)配置方法
linux 入侵常用命令汇编
Linux 快速定位web路径方法
winxp apache用php建本地虚拟主机的方法
Apache 多站点虚拟主机配置方法
redhat Server release 5.2 安装配置简明教程
Ubuntu Linux系统下轻松架设nginx+php服务器应用
Linux Apache+Proftpd构建虚拟主机时要注意的几个安全问题
Linux 服务器同步 Rsync同步服务器文件
APACHE 多站点配置方法
基于Apache的支持.NET2.0的Web服务器搭建
Ubuntu 下配置Rsync服务的方法
利用rsync自动备份 完全配置方法 增加了ip限制
Linux 每天自动备份mysql数据库的方法

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


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