|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HELP!: IIS, Tomcat, Tomcat JK Redirector, Multiple websites requiring Tomcat
Hi All,
I have the following setup: IIS 5 on Window Server 2000 SP4 Tomcat 5.5.20 JK Redirector 1.2.16 I have multiple websites: a.foobar.com b.foobar.com c.foobar.com At the moment, I can successfully serve JSP content from a.foobar.com However, when I try to place content on b.foobar.com, the browser just returns the JSP code (rather than executing it). When I look at the JK redirect logs, I see nothing going to the b.foobar.com site. My workers.properties.minimal looks like: Code:
# The advanced router LB worker worker.list=router,router2 # Define a worker using ajp13 worker.worker1.port=8009 worker.worker1.host=a.foobar.com worker.worker1.type=ajp13 worker.worker1.lbfactor=1 # Define another worker using ajp13 worker.worker2.port=8009 worker.worker2.host=b.foobar.com worker.worker2.type=ajp13 worker.worker2.lbfactor=1 # Define the LB worker worker.router.type=lb worker.router.balance_workers=worker1 worker.router2.type=lb worker.router2.balance_workers=worker2 My uriworkermap.properties looks like: Code:
# uriworkermap.properties - IIS # # This file provides sample mappings for example ajp13w # worker defined in workermap.properties.minimal # a.foobar.com sites /app1/*.jsp=router # b.foobar.com /app2/*.jsp=router2 My server.xml looks like: Code:
<Server port="8005" shutdown="SHUTDOWN">
<!-- Comment these entries out to disable JMX MBeans support used for the
administration web application -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
<!-- Global JNDI resources -->
<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="8009" protocol="AJP/1.3" />
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<!-- Define the top level container in our container hierarchy -->
<Engine name="Catalina" defaultHost="b.foobar.com">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps">
</Host>
<Host name="a.foobar.com" appBase="d:\a.foobar.com\webapps">
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="a_com_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
</Host>
<Host name="b.foobar.com" appBase="d:\b.foobar.com\webapps">
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve"
directory="logs" prefix="b_com_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
</Host>
</Engine>
</Service>
</Server>
Is this the right way of doing this? What am I doing incorrectly? The b.avs.com app never works. It seems as though IIS never gets the packets to Tomcat - which means the redirector is only forwarding the a.foobar.com and not the b.foobar.com So I think my workers and uriworkermap files are not setup correctly for the two sites. Any ideas? Thanks in advance! Last edited by snoopspecial : October 26th, 2006 at 05:21 PM. Reason: not clear i need help |
|
#2
|
|||
|
|||
|
You might try asking about this in the Java or Apache forum, I don't see where IIS enters in this picture. IIS doesn't execute jsp code.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
Thanks,
I did ask there as well - but it was a combination of both JK, Tomcat, and IIS problems. IIS related comments: 1. You have to make sure that each site individually has a virtual directory setup for Jakart (isapi_redirect.dll) 2. You have to allow Tomcat with Everyone permissions. Now I haven't dived in further, but does anyone know which user Tomcat uses? HINT: It's not IUSR_MACHINENAME. I will look as opening it up for Everyone is not good security. 3. JSP output to logs get dumped into the Tomcat home directory - so you need to create sub directories and give them Write permissions. 4. Use Firefox for testing - IE masks all the important details and Firefox shows them - obviously too, you need to go back and tuck all the messages away so that Firefox doesn't display anything it shouldn't. 5. Make sure you have the ISAPI filter set for JK on all website too. I'll post the Java and Tomcat related items in the Java Help forum with the same heading. Packet flow: IIS: 80 -> JK (JSP, Servlets, etc - defined in Uriworkermap) -> Tomcat:8009 You need to setup IIS to point to JK and it's DLLs. |
|
#4
|
|||
|
|||
|
Those "IIS comments" aren't, other than using some add-on isapi to do port redirection. Everything else is completely unrelated to IIS.
|
|
#5
|
|||
|
|||
|
Isn't this forum for:
IIS forum discussing Microsoft's Internet Information Server including its configuration, optimization and other related topics. IIS is the most popular web server for the Windows platform. |
|
#6
|
|||
|
|||
|
Quote:
Yes, and we try to keep this forum on-topic, hence my comments above. |
![]() |
| Viewing: Dev Shed Forums > System Administration > IIS > HELP!: IIS, Tomcat, Tomcat JK Redirector, Multiple websites requiring Tomcat |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|