Problem to connect Apache 2.0.43 and Tomcat 4.1.12 by using mod_jk2?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Patrick_GIRY
Posted On:   Thursday, October 17, 2002 06:20 AM

On Windows NT I used Apache 2.0.43, Tomcat 4.1.12 and mod_jk2 for an existing site. I have defined a virtual-host in the httpd.conf : NameVirtualHost 127.0.0.1 DocumentRoot "D:/Eclipse_sdk/2.0.1/eclipse/workspace/ProjetInfonetLivraisonPage" DirectoryIndex index.html Options AllowOverride None Order allow,deny Allow from all I have connected Apache to Tomcat with the mod_jk2 by defining the workers2.properties like this : [uri:/*] worker=ajp13:localhost:8009 The problem when I request with http://localhost/ I see the Tomcat document root and not th   More>>

On Windows NT I used Apache 2.0.43, Tomcat 4.1.12 and mod_jk2 for an existing site.


I have defined a virtual-host in the httpd.conf :

			
NameVirtualHost 127.0.0.1


DocumentRoot "D:/Eclipse_sdk/2.0.1/eclipse/workspace/ProjetInfonetLivraisonPage"
DirectoryIndex index.html

Options
AllowOverride None
Order allow,deny
Allow from all





I have connected Apache to Tomcat with the mod_jk2 by defining the workers2.properties like this :

			
[uri:/*]
worker=ajp13:localhost:8009



The problem when I request with http://localhost/ I see the Tomcat document root and not the Apache docuemt root defined in the httpd.conf.


Why my vhost is ignored??


Patrick GIRY

   <<Less

Re: Problem to connect Apache 2.0.43 and Tomcat 4.1.12 by using mod_jk2?

Posted By:   Patrick_GIRY  
Posted On:   Friday, October 18, 2002 01:30 AM

I answer myself for other people which may have the same problem!



If you want to define a virtual host in your apache httpd.conf and a tomcat web app with the same context ('/') you must not define the redirection uri in the mod_jk2 config file (workers2.properties) like this :



[uri:/*]

worker=ajp13:localhost:8009



But you must define an uri for all of your servlet alias defined in the webapp like this :



[uri:/AliasServlet1]

worker=ajp13:localhost:8009



[uri:/AliasServlet2]

worker=ajp13:localhost:8009



[uri:/AliasServlet3]

worker=ajp13:localhost:8009



...
About | Sitemap | Contact