forked from Netflix/asgard
-
Notifications
You must be signed in to change notification settings - Fork 0
Tomcat configuration
jgritman edited this page Dec 11, 2012
·
6 revisions
- Download the latest war from http://netflix.box.com/asgard/
- Download and expand the latest stable Apache Tomcat from http://tomcat.apache.org/
- Delete the contents of apache-tomcat-x/webapps/
- Copy asgard.war into apache-tomcat-x/webapps/
- Set the context root and port. See 'Configuration' below.
- Run apache-tomcat-x/bin/startup.sh
- See Troubleshooting if there is a problem
- Context Root
- Set Asgard's context root to an empty string in order to omit the war file name from URLs.
- See
docBase
andpath
in the example below.
- Port
- Change the server's port number if you wish. See
port
in the example below. - Set the port to 80 if you want all web traffic for your box to go to Asgard.
- Set the port to something else if you might have other systems using port 80 on the same box.
- Routing traffic through an Apache web server is optional.
- On Linux you can use IP tables to route port 80 traffic to your preferred Tomcat port.
- Change the server's port number if you wish. See
Tested with Tomcat 7
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Host appBase="webapps" autoDeploy="false" deployOnStartup="false"
name="localhost" unpackWARs="true" xmlValidation="false"
xmlNamespaceAware="false">
<Context className="org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper"
cookies="true" crossContext="false" displayName="Welcome to Asgard"
docBase="asgard.war" path="" privileged="false"
reloadable="false" swallowOutput="false" useNaming="true"
wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>
<Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="'%h %t "%r" %s %Dms %b"/>
</Host>
</Engine>
</Service>
</Server>
A Netflix Original Production
Tech Blog | Twitter @NetflixOSS | Jobs