You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brad O'Hearne <br...@neurofire.com> on 2006/02/23 18:21:46 UTC

Configuring mod_jk, and the notion of "webapps"

I have been having trouble getting mod_jk to work. After having Googled 
and read various information on configuring mod_jk (that's the first 
problem -- we need good documentation without having to Google), I 
settled on this link which is a pretty good HOWTO:

http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html

The problem is, once I got everything setup, things didn't work as 
expected. Before going into a long diatribe about all the potential 
issues, what I checked, etc., I want to inquire about the notion of this 
document's advice about your "webapp", as mentioned in http.conf and 
server.xml configuration, and as shown in step 5 of this HOWTO, in 
directory creation. The document instructs you to create the appropriate 
application directories as follows:

mkdir /home/tomcat/webapps
mkdir /home/tomcat/webapps/{YOUR_DOMAIN}
mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/logs
mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF
mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF/classes

In the httpd.conf, the virtualHost directive setup recommended is as 
follows:

<VirtualHost 127.0.0.1:80>
	ServerAdmin webmaster@{YOUR_DOMAIN}
	ServerName {YOUR_DOMAIN}
	DocumentRoot /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
	ErrorLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/error_log
	CustomLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/access_log common
	JkMount /*.jsp wrkr
	JkMount /servlet/* wrkr
	# Deny direct access to WEB-INF
	<LocationMatch ".*WEB-INF.*">
		AllowOverride None
		deny from all
	</LocationMatch>
</VirtualHost>

and in configuring the Tomcat context, the configuration recommended is as follows:

<Context path=""
	docBase="{YOUR_APPLICATION}"
	reloadable="true"
	debug="0"/>

I don't get the {YOUR_APPLICATION} part of this. Basically, I have a domain, and from it, I will be serving the contents of one or more web applications. 
These web applications of course are WAR files. The directory creation instructions look as if you would be creating the exploded WAR structure manually, and the virtual
host configuration and context configuration appear to be addressing a particular WAR. This doesn't make sense to me. All I want to do is forward all requests with a particular
prefix to Tomcat, regardless of the web application, and based upon the prefix, tomcat will determine which web application will respond (just as if you were using Tomcat without
Apache httpd). 

Can someone give me a heads up on how to configure this? Thanks!

Brad





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


Re: Configuring mod_jk, and the notion of "webapps"

Posted by Mladen Turk <ml...@jboss.com>.
Brad O'Hearne wrote:
> I have been having trouble getting mod_jk to work. After having Googled 
> and read various information on configuring mod_jk (that's the first 
> problem -- we need good documentation without having to Google), I 
> settled on this link which is a pretty good HOWTO:
>

I agree with you. We need a better documentation, but at the
end of the day no one ever wishes to contribute.
Mod_jk is open source project and without help from the
community I'm not sure how it's quality can ever rise.

So, I would suggest that if you come to an idea how
to extend the existing docs to the next level, simply
write a small email and send it to the dev@tomcat.apache.org

The guys there will be happy to commit that.

Best regards,
Mladen.

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


Re: Configuring mod_jk, and the notion of "webapps"

Posted by Brad O'Hearne <br...@neurofire.com>.
Vanessa,

Thanks for the resource. However, as I've been told, in-process/JNI 
is/will be deprecated and isn't recommended with Tomcat 5.5 and Apache 
2.x, and it appears that this particular configuration is trying to do 
that. Perhaps I've heard wrong. But I guess the confusion underscores 
the lack of documentation surrounding this area of Tomcat.

Brad

Vanessa Campos wrote:

>Brad,
>
>I found a good how-to that helped me put mod_jk to work.
>www.howtoforge.com/apache2_tomcat5_mod_jk
>
>It's very simple, and it works.
>
>--- Brad O'Hearne <br...@neurofire.com> escreveu:
>
>  
>
>>I have been having trouble getting mod_jk to work. After having
>>Googled 
>>and read various information on configuring mod_jk (that's the
>>first 
>>problem -- we need good documentation without having to Google), I 
>>settled on this link which is a pretty good HOWTO:
>>
>>http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html
>>
>>The problem is, once I got everything setup, things didn't work as 
>>expected. Before going into a long diatribe about all the potential
>>
>>issues, what I checked, etc., I want to inquire about the notion of
>>this 
>>document's advice about your "webapp", as mentioned in http.conf
>>and 
>>server.xml configuration, and as shown in step 5 of this HOWTO, in 
>>directory creation. The document instructs you to create the
>>appropriate 
>>application directories as follows:
>>
>>mkdir /home/tomcat/webapps
>>mkdir /home/tomcat/webapps/{YOUR_DOMAIN}
>>mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/logs
>>mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
>>mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF
>>mkdir
>>
>>    
>>
>/home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF/classes
>  
>
>>In the httpd.conf, the virtualHost directive setup recommended is
>>as 
>>follows:
>>
>><VirtualHost 127.0.0.1:80>
>>	ServerAdmin webmaster@{YOUR_DOMAIN}
>>	ServerName {YOUR_DOMAIN}
>>	DocumentRoot /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
>>	ErrorLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/error_log
>>	CustomLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/access_log
>>common
>>	JkMount /*.jsp wrkr
>>	JkMount /servlet/* wrkr
>>	# Deny direct access to WEB-INF
>>	<LocationMatch ".*WEB-INF.*">
>>		AllowOverride None
>>		deny from all
>>	</LocationMatch>
>></VirtualHost>
>>
>>and in configuring the Tomcat context, the configuration
>>recommended is as follows:
>>
>><Context path=""
>>	docBase="{YOUR_APPLICATION}"
>>	reloadable="true"
>>	debug="0"/>
>>
>>I don't get the {YOUR_APPLICATION} part of this. Basically, I have
>>a domain, and from it, I will be serving the contents of one or
>>more web applications. 
>>These web applications of course are WAR files. The directory
>>creation instructions look as if you would be creating the exploded
>>WAR structure manually, and the virtual
>>host configuration and context configuration appear to be
>>addressing a particular WAR. This doesn't make sense to me. All I
>>want to do is forward all requests with a particular
>>prefix to Tomcat, regardless of the web application, and based upon
>>the prefix, tomcat will determine which web application will
>>respond (just as if you were using Tomcat without
>>Apache httpd). 
>>
>>Can someone give me a heads up on how to configure this? Thanks!
>>
>>Brad
>>
>>
>>
>>
>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>    
>>
>
>
>Vanessa Campos
>dkaths@yahoo.com
>ICQ 35381281
>
>"Efetivamente, para o homem, enquanto homem, nada tem valor a menos que ele possa executa-lo com entusiasmo" Max Weber
>
>
>		
>_______________________________________________________
>Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
>http://br.acesso.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


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


Re: Configuring mod_jk, and the notion of "webapps"

Posted by Vanessa Campos <dk...@yahoo.com>.
Brad,

I found a good how-to that helped me put mod_jk to work.
www.howtoforge.com/apache2_tomcat5_mod_jk

It's very simple, and it works.

--- Brad O'Hearne <br...@neurofire.com> escreveu:

> I have been having trouble getting mod_jk to work. After having
> Googled 
> and read various information on configuring mod_jk (that's the
> first 
> problem -- we need good documentation without having to Google), I 
> settled on this link which is a pretty good HOWTO:
> 
> http://www.meritonlinesystems.com/docs/apache_tomcat_redhat.html
> 
> The problem is, once I got everything setup, things didn't work as 
> expected. Before going into a long diatribe about all the potential
> 
> issues, what I checked, etc., I want to inquire about the notion of
> this 
> document's advice about your "webapp", as mentioned in http.conf
> and 
> server.xml configuration, and as shown in step 5 of this HOWTO, in 
> directory creation. The document instructs you to create the
> appropriate 
> application directories as follows:
> 
> mkdir /home/tomcat/webapps
> mkdir /home/tomcat/webapps/{YOUR_DOMAIN}
> mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/logs
> mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
> mkdir /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF
> mkdir
>
/home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}/WEB-INF/classes
> 
> In the httpd.conf, the virtualHost directive setup recommended is
> as 
> follows:
> 
> <VirtualHost 127.0.0.1:80>
> 	ServerAdmin webmaster@{YOUR_DOMAIN}
> 	ServerName {YOUR_DOMAIN}
> 	DocumentRoot /home/tomcat/webapps/{YOUR_DOMAIN}/{YOUR_APPLICATION}
> 	ErrorLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/error_log
> 	CustomLog /home/tomcat/webapps/{YOUR_DOMAIN}/logs/access_log
> common
> 	JkMount /*.jsp wrkr
> 	JkMount /servlet/* wrkr
> 	# Deny direct access to WEB-INF
> 	<LocationMatch ".*WEB-INF.*">
> 		AllowOverride None
> 		deny from all
> 	</LocationMatch>
> </VirtualHost>
> 
> and in configuring the Tomcat context, the configuration
> recommended is as follows:
> 
> <Context path=""
> 	docBase="{YOUR_APPLICATION}"
> 	reloadable="true"
> 	debug="0"/>
> 
> I don't get the {YOUR_APPLICATION} part of this. Basically, I have
> a domain, and from it, I will be serving the contents of one or
> more web applications. 
> These web applications of course are WAR files. The directory
> creation instructions look as if you would be creating the exploded
> WAR structure manually, and the virtual
> host configuration and context configuration appear to be
> addressing a particular WAR. This doesn't make sense to me. All I
> want to do is forward all requests with a particular
> prefix to Tomcat, regardless of the web application, and based upon
> the prefix, tomcat will determine which web application will
> respond (just as if you were using Tomcat without
> Apache httpd). 
> 
> Can someone give me a heads up on how to configure this? Thanks!
> 
> Brad
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


Vanessa Campos
dkaths@yahoo.com
ICQ 35381281

"Efetivamente, para o homem, enquanto homem, nada tem valor a menos que ele possa executa-lo com entusiasmo" Max Weber


		
_______________________________________________________
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora!
http://br.acesso.yahoo.com

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