You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Morrow <da...@autodata.net> on 2005/02/15 21:25:28 UTC
Allow Apache to Serve Static Content
Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this?
David A. Morrow
Technical Systems Lead
Autodata Solutions Company
David.Morrow@Autodata.Net
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615
< Poor planning on your part does not necessarily constitute an emergency on my part. >
This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>
Re: Allow Apache to Serve Static Content
Posted by Peter Lin <wo...@gmail.com>.
rather than setup tomcat + jk2 + apache, I would recommend setting up
a dedicated image server. If you look at the static file benchmark
results I posted recently, tomcat is actually faster for 1k files and
equal to apache for larger than 1k files.
http://cvs.apache.org/~woolfel/tc_results.html
I hope that helps
peter
On Tue, 15 Feb 2005 15:25:28 -0500, Dave Morrow
<da...@autodata.net> wrote:
> Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this?
>
> David A. Morrow
> Technical Systems Lead
> Autodata Solutions Company
> David.Morrow@Autodata.Net
> http://www.autodata.net
> Tel: (519) 951-6079
> Fax: (519) 451-6615
>
> < Poor planning on your part does not necessarily constitute an emergency on my part. >
>
> This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Allow Apache to Serve Static Content
Posted by Andre Van Klaveren <ny...@gmail.com>.
This assumes of course that you are running Apache and Tomcat on the
same server. The concept is pretty much the same though. You set the
DocumentRoot to where your static files reside on Apache and map your
JSPs and servlets to your JK worker that redirects the request to your
Tomcat instance.
On Tue, 15 Feb 2005 15:48:18 -0500, Charles N. Harvey III
<ch...@alloy.com> wrote:
> Point the DocumentRoot directory to your webapps directory.
> Then, in your jk mapping, map only *.jsp and *.servlet to
> Tomcat.
>
> ## WEBSITE ##
> <VirtualHost *>
> ServerAdmin hostmaster@website.com
> DocumentRoot /code/www/webapps/website/ROOT
> ServerName www.website.com
> CustomLog "|/code/utils/cronolog/cronolog
> /logs/apache/website_access_log_%Y_%m_%d.txt" combined
> ErrorLog "|/code/utils/cronolog/cronolog
> /logs/apache/website_error_log_%Y_%m_%d.txt"
> JkMount /*.jsp tomcat
> JkMount /*.do tomcat
> </VirtualHost>
>
> Charlie
>
> Dave Morrow said the following on 2/15/2005 3:25 PM:
>
> >Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this?
> >
> >David A. Morrow
> >Technical Systems Lead
> >Autodata Solutions Company
> >David.Morrow@Autodata.Net
> >http://www.autodata.net
> >Tel: (519) 951-6079
> >Fax: (519) 451-6615
> >
> >< Poor planning on your part does not necessarily constitute an emergency on my part. >
> >
> >This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Allow Apache to Serve Static Content
Posted by "Charles N. Harvey III" <ch...@alloy.com>.
Point the DocumentRoot directory to your webapps directory.
Then, in your jk mapping, map only *.jsp and *.servlet to
Tomcat.
## WEBSITE ##
<VirtualHost *>
ServerAdmin hostmaster@website.com
DocumentRoot /code/www/webapps/website/ROOT
ServerName www.website.com
CustomLog "|/code/utils/cronolog/cronolog
/logs/apache/website_access_log_%Y_%m_%d.txt" combined
ErrorLog "|/code/utils/cronolog/cronolog
/logs/apache/website_error_log_%Y_%m_%d.txt"
JkMount /*.jsp tomcat
JkMount /*.do tomcat
</VirtualHost>
Charlie
Dave Morrow said the following on 2/15/2005 3:25 PM:
>Hi all, I have Apache integrated with Tomcat using mod_jk2 and all is working well with the exception of performance. I would like to direct Apache to serve the static content components of my Java application. How is this done? I presume there must be some type of httpd.conf setting to do this?
>
>David A. Morrow
>Technical Systems Lead
>Autodata Solutions Company
>David.Morrow@Autodata.Net
>http://www.autodata.net
>Tel: (519) 951-6079
>Fax: (519) 451-6615
>
>< Poor planning on your part does not necessarily constitute an emergency on my part. >
>
>This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org