IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 26th, 2006, 05:17 PM
snoopspecial snoopspecial is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 11 snoopspecial User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 33 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 29th, 2006, 04:29 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Jun 2003
Posts: 11,118 Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 12 h 59 m 42 sec
Reputation Power: 830
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

Reply With Quote
  #3  
Old October 31st, 2006, 10:43 AM
snoopspecial snoopspecial is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 11 snoopspecial User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 33 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old October 31st, 2006, 12:36 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Jun 2003
Posts: 11,118 Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 12 h 59 m 42 sec
Reputation Power: 830
Those "IIS comments" aren't, other than using some add-on isapi to do port redirection. Everything else is completely unrelated to IIS.

Reply With Quote
  #5  
Old October 31st, 2006, 01:46 PM
snoopspecial snoopspecial is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Posts: 11 snoopspecial User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 33 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old October 31st, 2006, 05:34 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Jun 2003
Posts: 11,118 Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level)Doug G User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 12 h 59 m 42 sec
Reputation Power: 830
Quote:
Originally Posted by snoopspecial
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.

Yes, and we try to keep this forum on-topic, hence my comments above.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > HELP!: IIS, Tomcat, Tomcat JK Redirector, Multiple websites requiring Tomcat


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT