LinuxSir.cn,穿越时空的Linuxsir!

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

求助!AS4.0下配置虚拟主机遇到的问题!

[复制链接]
发表于 2006-3-31 14:39:31 | 显示全部楼层 |阅读模式
我用的系统是AS4。0 我要配置虚拟主机,
问题1. 只能把目录放在/var/www/html下,
比如我再根下建一个/www 目录或放在/home下的时候重启apache时候就会没有问题。但是我访问页面的时候打开的却是apache的那个默认页面,并不是我的index.htm文件内容。
NameVirtualHost 192.168.20.180

<VirtualHost 192.168.20.180>
    DocumentRoot /www/httpd/htdocs
    ServerName paulhou.com.cn
    DirectoryIndex index.htm
</VirtualHost>

<VirtualHost 192.168.20.180>
    DocumentRoot /www/httpd/htdocs
    ServerName paul.com.cn
    DirectoryIndex index.htm
发表于 2006-3-31 14:51:21 | 显示全部楼层
看看/etc/httpd/conf.d/welcome.conf设置的内容,
<LocationMatch "^/+$">
    Options -Indexes
    ErrorDocument 403 /error/noindex.html
</LocationMatch>

当匹配网站首页时,如果没有发现匹配页(403报错),显示/error/noindex.html

建议首先看看Error Log是不是权限问题或者Selinux捣乱
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-31 15:24:10 | 显示全部楼层
我查看了一下,没什么不对的,还是不行。
而且有个新的问题,当我加载一块新硬盘到home1(我自己建的)时候,我重启apache,他提示我:
Stopping httpd: [  OK  ]
Starting httpd: Warning: DocumentRoot [/home1/vhost] does not exist
Warning: DocumentRoot [/home1/vhost] does not exist
[  OK  ]
[root@localhost ~]#
我看了一下,新加载的硬盘有个这个目录了,为什么说不存在??

Selinux 是做什么的?
回复 支持 反对

使用道具 举报

发表于 2006-4-4 00:13:43 | 显示全部楼层
selinux是as4.0新功能。增强型linux
回复 支持 反对

使用道具 举报

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

本版积分规则

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