Kapil Sharma wrote:

> I have got a problem. I am using apache 1.3.26+tomcat 1.3.1. Is there
> any way to know that apache is serving all static content like
> .html/.gif/.jpeg? My virtual host (in apache) is running very slow and
> images are breaking..

I would try these things: (Bear in mind that I am a OpenBSD user and Tomcat
beginner, so this may be completely out of range.

1. Find the problem. Go directly to Tomcat (using its network port), without
passing through the Apache server. If this is faster, the problem is on the
Apache side, if it's still slow, the problem is on the Tomcat side.

2. If the problem is on Tomcat: Are the static pages also parsed by Tomcat. It
should be possible to set some extensions as static content and send them through
the server without parsing them for JSP code etc. I think this is defined in your
web.xml file. (I *said* I'm a beginner:-)

3. Anyway, if the problem can't be fixed in Tomcat, you could set your Apache to
forward only URL:s that end in .jsp to Tomcat.
I use URL rewriting to forward any http://jsp.my.server.com/url.html url to
http://my.server.com:8080/url.html
In that case you do the same, it is easy:
Modify your your Apache httpd.conf under the virutal hosts section for the Tomcat
server:
 RewriteEngine On
 RewriteCondition %{HTTP:Authorization} ^(.*)
 RewriteRule ^(.*\.jsp) http://your.server:8080$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l,P]

Then Authorization line is only needed if you are using logins or other features
that use HTTP authorization.
The last line is
 RewriteRule ^(.*) (etcetera)
if you want to forward everything to port 8080.

You will of course need to do "LoadModule rewrite_module
/usr/lib/apache/modules/mod_rewrite.so" or similar earlier in your httpd.conf,
but that is covered elsewhere in the Apache documentation.

Good luck.

    /Fredrik




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to