2016-11-29 145 views
0

我习惯于管理Apache网络服务器,并被Tomcat 8卡住了。我在计算机上安装了Guacamole,我将.war文件复制到/var/lib/tomcat8/webapps,该文件自动解压缩, t在端口:8080上访问它。我看到/var/lib/tomcat8/webapps/guacamole中的文件,所以我将它们复制到/var/lib/tomcat8/webapps/ROOT工作。我现在可以在端口:8080上看到它。Tomcat8的“虚拟主机”

下一步是要解决为什么没有在自己的目录工作,所以我设置在/etc/tomcat8/server.xml本节:

<Service name="Guacamole"> 
<Connector port="8081" protocol="HTTP/1.1" 
        connectionTimeout="20000" 
        URIEncoding="UTF-8" /> 
     <Engine name="Catalina" defaultHost="localhost"> 
       <Realm className="org.apache.catalina.realm.LockOutRealm"> 
         <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> 
       </Realm> 
       <Host name="localhost" appBase="webapps/guac" unpackWARs="true" autoDeploy="true"> 
       <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" 
          prefix="guacamole_access_log" suffix=".txt" 
          pattern="%h %l %u %t %v &quot;%r&quot; %s %b" /> 
       </Host> 
     </Engine> 
</Service> 

我已经尝试设置,最多有不同appBase的十几种不同的方式目录等。当我启动Tomcat,都在catalina.out的文件似乎很好,但是当我检查日志文件对于这项服务,我得到:

192.168.1.228 - - [29/Nov/2016:11:48:30 -0700] "GET/HTTP/1.1" 404 - 
192.168.1.228 - - [29/Nov/2016:11:48:41 -0700] "GET /index.html HTTP/1.1" 404 - 

我都尝试http://192.168.1.25:8080/http://192.168.1.25:8080/index.html,我可以在/var/lib/tomcat8/webapps/guacamole目录中看到,但没有运气。

我试图看看是否可以从Tomcat获得更详细的信息,看看我是否可以得到它尽管路径应该是这些文件,但在这个页面上似乎没有选项:https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/valves/AccessLogValve.html得到这个类型的输出:

192.168.1.228 - - [29/Nov/2016:11:48:30 -0700] "GET /var/lib/tomcat8/webapps/guacamole/ HTTP/1.1" 404 - 
192.168.1.228 - - [29/Nov/2016:11:48:41 -0700] "GET /var/lib/tomcat8/webapps/guacamole/index.html HTTP/1.1" 404 - 

任何帮助,帮助我确定我做了什么毛病我的第一个Java web应用项目赞赏

回答