[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] Tomcat + 2 app



Hola,

Lo que hice ahora fue crear los virtualhost en apache y en server.xml
definir las apps y como seria el dominio adonde debería apuntar....pero
sigo con el mismo problema!!!

########
apache
########

<VirtualHost *:80>
       ServerName test1.com
       ServerAlias www.test1.com

       ProxyRequests Off
       ProxyPreserveHost On

       ErrorLog /var/log/httpd/tomcat.error.log
       CustomLog /var/log/httpd/tomcat.log combined

       <Proxy *>
               Order deny,allow
               Allow from all
       </Proxy>

       ProxyPass / ajp://localhost:8009/
       ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

<VirtualHost *:80>
       ServerName test2.com
       ServerAlias www.test2.com

       ProxyRequests Off
       ProxyPreserveHost On

       ErrorLog /var/log/httpd/tomcat.error.log
       CustomLog /var/log/httpd/tomcat.log combined

       <Proxy *>
               Order deny,allow
               Allow from all
       </Proxy>

       ProxyPass / ajp://localhost:8009/
       ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>


##########
server.xml
##########

  <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" />


    <Engine name="Catalina" defaultHost="localhost">


      <Host name="localhost"  appBase="webapps"
            unpackWARs="false" autoDeploy="false"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>

        <Host name="test1.com"  appBase="historial"
            unpackWARs="false" autoDeploy="false"
            xmlValidation="false" xmlNamespaceAware="false">

        </Host>


        <Host name="test2.com"  appBase="conectaviz"
            unpackWARs="false" autoDeploy="false"
            xmlValidation="false" xmlNamespaceAware="false">
        </Host>



    </Engine>
  </Service>
</Server>

Las carpetas donde estan definidas las app estan a la misma altura que
webapps:

tomcat  -- webapps
	-- conectaviz
	-- historial	

varios de los ejemplos que vi están definidos de esa manera y funcionan.


-- 
Lacho:~#


Reply to: