|
:help
我使用基于名称的虚拟主机,希望实现以下功能。
当我在浏览器中输入peter.cnshanghaidb1.sg.cn时候显示页面为
/http/index.htm里的内容。
我在httpd.conf 里的配置为(以下配置使用httpd -t 测试语法通过)
NameVirtualHost 10.86.26.65
<VirtualHost 10.86.26.65 >
ServerAdmin root@cnshanghaidb1.sg.cn
DocumentRoot /http
ServerName peter.cnshanghaidb1.sg.cn
</VirtualHost>
目录的权限为
drwxrwxrwx 2 root root 4096 Jun 18 18:30 http
index.htm 的权限为
-rwxr-xr-x 1 root root 24 Jun 18 18:30 index.htm
我已将firewall 关闭。
service iptables status
Firewall is stopped.
我的 /etc/resolv.conf 内容为
search cnshanghaidb1.sg.cn
nameserver 10.86.26.5
nameserver 10.152.31.203
nameserver 159.151.120.40
nameserver 159.151.248.37
我的 /etc/hosts 内容为
10.86.26.65 peter.cnshanghaidb1.sg.cn
但是当我在浏览器中输入peter.cnshanghaidb1.sg.cn 的地址,系统报连接peter.cnshanghaidb1.sg.cn 超时
我不知道这是不是和dns 有关?因为我的httpd.conf应该没有问题。
另外,我想请问 ServerName 是不是和dns服务器的域名有关?还是随便写什么都可以?
请给我些提示!
谢谢
:thank |
|