-
1. Re: Isapi and virtual hosts with JBoss/Jetty
jlemm Feb 10, 2004 12:54 PM (in response to jlemm)Did I post this in the correct forum?
-
2. How did you get it to work in the first place?
mshaikh Mar 23, 2004 9:24 AM (in response to jlemm)I'm struggling with this one as well. However, I don't even know how to set it up so that IIS 6 could talk to Jboss-Tomcat 3.2.3. Where did you find the binaries and stuff?
Munzoor
mshaikh@omeda.com
(847) 564-8900 x269 -
3. Re: Isapi and virtual hosts with JBoss/Jetty
jlemm Apr 19, 2004 1:04 PM (in response to jlemm)Ok -- I figured this out a while ago & thought that I'd pass it along...
(Don't you just hate it when people don't do that?)
PART 1: Setting up the ISAPI. There are several good sites that give you step by step instructions on how to set up the apache jk connector (isapi_redirector2.dll) between IIS and Tomcat. Do a few google searches and you will find them. The trick with IIS6 is to remember to enable the filter in the Web Services Extension tab. IIS6 comes totally locked down.
PART 2: In the workers2.properties file (seriously simplified example since I redirect everything in this example)[uriMap:] info=Maps the requests. Options: debug debug=1 [shm:] info=Shared memory file. Required for multiprocess servers file=D:\tmpShare\jk2.shm size=1048576 # Example socket channel [channel.socket:localhost:8009] tomcatId=localhost:8009 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/*] context=/* alias=localhost # define the worker [status:status] # Uri mapping [uri:/jkstatus/*] worker=status:status
PART 3: Defining the virtual hosts in jboss-service.xml
I will be showing only the "Config" tag in this file.<attribute name="Config"> <Server> <Service name="JBoss-Tomcat"> <Engine name="MainEngine" defaultHost="localhost"> <Logger className="org.jboss.web.tomcat.Log4jLogger" verbosityLevel="debug" category="org.jboss.web.localhost.Engine"/> <DefaultContext cookies="true" crossContext="true" override="true"/> <!-- This host is deployed in an ear & I've assigned the root directory to it --> <Host name="localhost" appBase="/" autoDeploy="true"> <Logger className="org.jboss.web.tomcat.Log4jLogger" verbosityLevel="debug" category="org.jboss.web.Host=localhost"/> <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/> </Host> <!-- This host is deployed as a war --> <Host name="www.eq.test" appBase="/equity/" autoDeploy="true"> <Logger className="org.jboss.web.tomcat.Log4jLogger" verbosityLevel="debug" category="org.jboss.web.Host=localhost"/> <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/> </Host> <!-- This host is deployed as a war --> <Host name="www.on.test" appBase="/eqweb/" autoDeploy="true"> <Logger className="org.jboss.web.tomcat.Log4jLogger" verbosityLevel="debug" category="org.jboss.web.Host=localhost"/> <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access" suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log"/> </Host> </Engine> <!-- A HTTP/1.1 Connector on port 8080 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" address="${jboss.bind.address}" port="8080" minProcessors="5" maxProcessors="100" enableLookups="true" acceptCount="10" debug="0" connectionTimeout="30000" useURIValidationHack="false"/> <!-- A AJP 1.3 Connector on port 8009 --> <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" address="${jboss.bind.address}" port="8009" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="30000" useURIValidationHack="false" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/> </Service> </Server> </attribute>
PART 4 - Directories
Under the <JBoss_Home>/server/default/deploy
1) Host 1 - I drop in the ear file
2) Host 2 - I created an equity.war directory & dropped in the files under that
3) Host 3 - I deployed a war file
PART 5 - jboss-web.xml
For each host deployed, you must define a joss-web.xml file. In this file, you define the virtual host and context root. The file must be placed in the WEB-INF directory:<jboss-web> <virtual-host>www.eq.test</virtual-host> <context-root>/</context-root> </jboss-web>
Hope this is helpful to someone.
JoAnn