LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 776|回复: 3

为什么我的虚拟主机不能工作?

[复制链接]
发表于 2005-7-9 10:29:13 | 显示全部楼层 |阅读模式
首先apache已经安装好,在浏览器中输入本机ip可以看到测试页。
/etc/httpd/conf/httpd.conf文件有关配置如下:

DocumentRoot /usr/share/doc/HTML/

<Directory /usr/share/doc/HTML/>

NameVirtualHost 192.168.1.5
<VirtualHost 192.168.1.5>
serverAdmin root@hbc.com
DocumentRoot /usr/share/doc/HTML/www
ServerName www3.hbc.com
</VirtualHost>
<VirtualHost 192.168.1.5>
serverAdmin root@hbc.com
DocumentRoot /usr/share/doc/HTML/ftp
ServerName ftp1.hbc.com
</VirtualHost>

我在/usr/share/doc/HTML/www下放了www.html文件,在/usr/share/d ... ftp.html文件。

DNS已经配置好,域名服务器是www.hbc,com,ip是192.168.1.1
host 192.168.1.5 输出如下
5.1.168.192.in-addr.arpa domain name pointer ftp1.hbc.com.
5.1.168.192.in-addr.arpa domain name pointer www3.hbc.com.
host www3.hbc.com 输出如下
www3.hbc.com has address 192.168.1.5

在浏览器通过ip 192.168.1.5访问,无法访问,提示超时。通过www3.hbc.com也无法访问。出错日志如下:


[Sat Jul 09 09:32:21 2005] [notice] caught SIGTERM, shutting down
[Sat Jul 09 09:32:22 2005] [notice] Digest: generating secret for digest authentication ...
[Sat Jul 09 09:32:22 2005] [notice] Digest: done
[Sat Jul 09 09:32:23 2005] [notice] Apache/2.0.40 (Red Hat Linux) DAV/2 configured -- resuming normal operations

恳请各位高手指点迷津!
 楼主| 发表于 2005-7-9 23:35:02 | 显示全部楼层
我自己先顶!
恳请各位高手指点迷津!

会不会是DNS的问题?
我可以正常上网,但是却ping不通网页。

ping www.linuxfans.org 提示如下:

PING www.linuxfans.org (210.76.108.234) 56(84) bytes of data.

--- www.linuxfans.org ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23416ms

恳请各位高手指点迷津!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-7-10 10:35:28 | 显示全部楼层
nslookup www.linuxfans.org  输出如下:
Server:                172.16.53.3
Address:        172.16.53.3#53

Non-authoritative answer:
Name:        www.linuxfans.org
Address: 210.76.108.234

DNS应该没有问题,究竟是什么原因??????
回复 支持 反对

使用道具 举报

发表于 2005-11-7 03:03:15 | 显示全部楼层
第一个dns没有指对,应该是:192.168.1.1
回复 支持 反对

使用道具 举报

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

本版积分规则

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