请教Apache配置虚拟主机和UserDir的问题

请问HonestQiao大哥,你说的这个日志在哪里?小弟新手,还望指教.多谢,不胜感激


QUOTE:
原帖由 babodx 于 2007-3-12 11:12 发表
请问HonestQiao大哥,你说的这个日志在哪里?小弟新手,还望指教.多谢,不胜感激

就是tomcat的日志啊。
[root@ict ~]# vi /usr/local/tomcat/logs/localhost_log.2007-03-12.txt
2007-03-12 11:12:51 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2007-03-12 11:12:51 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/balancer]Exception starting filter BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
        at org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)
        at org.apache.webapp.balancer.RulesParser.<init>(RulesParser.java:43)
        at org.apache.webapp.balancer.BalancerFilter.init(BalancerFilter.java:79)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
        at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:30
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:79)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:369
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:47
        at org.apache.catalina.core.StandardService.start(StandardService.java:480)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

2007-03-12 11:12:52 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2007-03-12 11:12:52 StandardContext[/balancer]Exception starting filter BalancerFilter
把你的server.xml参考下面设置一下子:
<Host name="YOUR SERVERNAME" debug="0" appBase="YOUR DOCUMENTROOT" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"  prefix="YOUR SERVERNAME"   suffix=".log"  timestamp="true"/>
    <Context path="" docBase="" debug="0" allowLinking="true"/>
    <Listener className="org.apache.catalina.startup.UserConfig" directoryName="public_html"      userClass="org.apache.catalina.startup.PasswdUserDatabase"/>  
</Host>

主要是:Listener className="org.apache.catalina.startup.UserConfig"
太好了.可以了
加入了
<Listener className="org.apache.catalina.startup.UserConfig" directoryName="public_html"      userClass="org.apache.catalina.startup.PasswdUserDatabase"/>  

能具体说说这条配制的含义吗?
PasswdUserDatabase这个类是什么作用?
我也遇到和楼主一样的问题

但是我们开放的个人主页不是在/home下面的目录,而是在自己建立的目录 /web/用户名 请问这样做也可以吗?
请问这个public_html也要建立在/web/用户名 的目录下吗?

还有,我机器上找不到srm.conf文件,请高手指导一下,这个文件在那里
在线等,谢谢