tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <carn...@electrichendrix.com>
Subject Re: Serve same content to multiple URL's
Date Thu, 04 Apr 2013 17:46:44 GMT
----- Original Message -----
From: "Chris Arnold" <carnold@electrichendrix.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, April 4, 2013 12:28:02 PM
Subject: Serve same content to multiple URL's

I am not sure if this is a Tomcat issue or an apache issue, so i will ask on both lists.
We have tomcat 6.03 on SLES11 and have content/webapp that we want to server to multiple domains.
We have 1 domain working using http://share.domain1.com. What we want is access to this same
webapp using http://share.anydomain.com. Here are configuration files:

worker.properties:

worker.list=jk-status
worker.jk-status.type=status
worker.jk-status.read_only=true
worker.list=jk-manager
worker.list=worker1
worker.list=worker2
worker.jk-manager.type=status
worker.list=balancer
worker.balancer.type=lb
worker.balancer.max_reply_timeouts=10
worker.balancer.balance_workers=worker1
worker.worker1.reference=worker.template
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.activation=A
worker.balancer.balance_workers=worker2
worker.worker2.reference=worker.template
worker.worker2.host=localhost
worker.worker2.port=8009
worker.worker2.activation=A
worker.template.type=ajp13
worker.template.socket_keepalive=true
worker.template.connection_pool_minsize=0
worker.template.connection_pool_timeout=600
worker.template.reply_timeout=300000
worker.template.recovery_options=3

Here is the configured virtualhost for that is working:
JkMount /share|/* worker1
RedirectMatch ^/$ http://share.domain.com/share/

I have tried to add a second worker (worker2) in workers.properties and added a virtualhost
like:
Here is the configured virtualhost for domain2:
2nd virtualhost:
JkMount /share|/* worker2
RedirectMatch ^/$ http://share.domain2.com/share/

When i type http://share.domain2.com i arrive at 1 of our websites but not the tomcat content.
When i type http://share.domain2.com/share i get a 404 error. Do i need to define another
worker to accomplish this or should the defined worker work for any domain given there is
a virtualhost defined?

I found the Tomcat virtualhost idea on a google search but not sure this is the optimum way
to accomplish what we need to do? And i should mention the requests are first going to apache
then forwarded to tomcat.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message