Created
March 7, 2014 15:52
-
-
Save jdmr/9414040 to your computer and use it in GitHub Desktop.
Tomcat 7 mod_cluster conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8'?> | |
<!-- | |
Hay que cambiar todos los puertos si va a usar el mismo servidor, no hay que configurarlos en ningun otro lugar | |
porque la instancia le va a decir al apache mediante mensajes que tienen entre ellos. | |
--> | |
<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" /> | |
<!-- Agregar esta linea --> | |
<Listener className="org.jboss.modcluster.container.catalina.standalone.ModClusterListener" proxyList="192.168.1.47:9999" advertise="true" /> | |
<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="8080" protocol="HTTP/1.1" | |
connectionTimeout="20000" | |
redirectPort="8443" /> | |
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> | |
<!-- Cambiar el nombre de jvmRoute a algo distinto por instancia --> | |
<Engine name="Catalina" defaultHost="localhost" jvmRoute="instance1"> | |
<!-- Asegurarse de que esta linea no este comentada si desea tener esta instancia como parte de un cluster --> | |
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> | |
<Realm className="org.apache.catalina.realm.LockOutRealm"> | |
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" | |
resourceName="UserDatabase"/> | |
</Realm> | |
<Host name="localhost" appBase="webapps" | |
unpackWARs="true" autoDeploy="true"> | |
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" | |
prefix="localhost_access_log." suffix=".txt" | |
pattern="%h %l %u %t "%r" %s %b" /> | |
</Host> | |
<!-- Y si soporta virtual hosts, si no usas virtual hosts no necesitas estas 3 lineas --> | |
<Host name="test.davidmendoza.org" appBase="vhosts/test" | |
unpackWARs="true" autoDeploy="true"> | |
</Host> | |
</Engine> | |
</Service> | |
</Server> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment