LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
123
返回列表 发新帖
楼主: hamas

如何让两个 3322.org 域名指向不同的目录?

[复制链接]
发表于 2005-10-13 20:07:51 | 显示全部楼层
sorry,happy去了
------

# Virtual hosts
#

# Virtual host Default Virtual Host
NameVirtualHost *
NameVirtualHost 192.168.1.2
<VirtualHost 192.168.1.2>

ServerAdmin root@zj21cn.com
DocumentRoot /var/www/html
ServerName xwy008.3322.org
</VirtualHost>

<VirtualHost 192.168.1.2>

ServerAdmin zj@zj21cn.com
DocumentRoot /var/www/zj21cn/
ServerName zj21cn.3322.org
UserDir /var/www/zj21cn/
LogLevel emerg
LogFormat "zj21cnlog"
</VirtualHost>

<VirtualHost 192.168.1.2>

ServerAdmin root@zj21cn.com
DocumentRoot /var/www/yybuku
ServerName yybuku.3322.org
</VirtualHost>
-------
你看看

我是10分钟后关机走,还要继续hapyy, 在等我呢
回复 支持 反对

使用道具 举报

发表于 2005-10-13 21:08:02 | 显示全部楼层
我的这个配置应该可以用的

内容很简单,很久没更新

兄弟试过了吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-13 22:38:40 | 显示全部楼层
哈哈哈,可以了,可以了,非常感谢你哟,好兄弟,非常感谢。
回复 支持 反对

使用道具 举报

发表于 2005-10-14 06:55:18 | 显示全部楼层
Post by zj21cn

# Virtual hosts
#

# Virtual host Default Virtual Host
NameVirtualHost *
NameVirtualHost 192.168.1.2
<VirtualHost 192.168.1.2>

ServerAdmin root@zj21cn.com
DocumentRoot /var/www/html
ServerName xwy008.3322.org
</VirtualHost>

<VirtualHost 192.168.1.2>

ServerAdmin zj@zj21cn.com
DocumentRoot /var/www/zj21cn/
ServerName zj21cn.3322.org
UserDir /var/www/zj21cn/
LogLevel emerg
LogFormat "zj21cnlog"
</VirtualHost>

<VirtualHost 192.168.1.2>

ServerAdmin root@zj21cn.com
DocumentRoot /var/www/yybuku
ServerName yybuku.3322.org
</VirtualHost>

不知道,你的apache是哪一版本的??

我的RHELAS4自带的2.0.52的如果将三个<VirtualHost 192.168.1.2>设定为相同,启动时会提示“Starting httpd: [Fri Oct 14 06:49:10 2005] [warn] VirtualHost 192.168.0.1:0 overlaps with VirtualHost 192.168.0.1:0, the first has precedence, perhaps you need a NameVirtualHost directive”

另外,在http.conf中,已经明确说明了“
#Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
回复 支持 反对

使用道具 举报

发表于 2005-10-14 08:08:24 | 显示全部楼层
RH8.0,完全安装

APACHE版本是1.3系列的吧
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-14 08:31:10 | 显示全部楼层
两位兄弟提供的都可以的,呵,都可以通过,哈哈哈。

非常感谢两位哟,这儿好人实在是多。顶下。
回复 支持 反对

使用道具 举报

发表于 2005-10-14 18:35:30 | 显示全部楼层
Post by zj21cn
RH8.0,完全安装

APACHE版本是1.3系列的吧

晕倒
我用的是RHELas4,apache-2.0.52

你的太老了吧~
BS~
:cool:
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表