Re: Remote access to Tomcat web server
eliliano@libero.it wrote:
That's right. But I configured Apache (httpd.conf) in a while, without
reading any manual. It was easy, and the instructions are written in a
very intuitive fashion.
That's not true for Tomcat. I've already downloaded and read more than
twenty documentation pages, and I made all of the changes I think they
can be useful to the server.xml file: nothing... it doesn't still
work.
Tomcat can be tricky, but the minimal setup doesn't really need to be. I
actually found Web Server's configuration harder to learn than Tomcat's, but
learning styles vary.
Here's the Tomcat (6.0, but it's the same for 5.5) server.xml that I use. You
may want to use the default ports (8005, 8080, 8009, 8443) rather than the
changes I made. Not everything I use is required to make Tomcat work. YMMV.
-----
<Server port="9005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"
/>
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="9080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="9443"
/>
<Connector port="9009" protocol="AJP/1.3" redirectPort="9443" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
</Engine>
</Service>
</Server>