Apache Server configuration support - Making sure Apache is serving images

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > September 2004 > Making sure Apache is serving images





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Making sure Apache is serving images
Tarun Jain

2004-09-23, 9:07 am

Hi,
I have a Apache + JRun 3.1 setup.
Apache version 1.3 on Windows 2000

The problem is that currently JRun is serving all the static content
including css, js and images. Additionally JRun 3.1 does not turn on
the expires http header so the content is not being cached on the
client.

So I want to make sure that Apache serves the images and not JRun. I
tried to use mod_alias to setup aliases for the image request
directories. But Apache was still handing off the image requests to
JRun. What can I do make sure that Apache serves the pages ?

The solution that I have right now is as follows:
1) Use mod_rewrite to transform all requests for images from
RewriteRule ^/PDC43Training/images(.*)
http://xyz.xyz.com/PDC43/images$1
2) Then use mod_alias to serve the page
Alias /PDC43/images/ D:/PDC43Training/Omct/images/
3) I have mod_expires set all image expiration = access + 1 month

The problem with this solution is that I am seeing a lot of HTTP 302
messages which is waste of bandwidth and is also not optimal.

What can I do to solve this?
Davide Bianchi

2004-09-23, 9:07 am

On 2004-09-20, Tarun Jain <tjain@hotmail.com> wrote:
> So I want to make sure that Apache serves the images and not JRun. I
> tried to use mod_alias to setup aliases for the image request
> directories. But Apache was still handing off the image requests to
> JRun. What can I do make sure that Apache serves the pages ?


Afaik, there is no way. The problem is that the whole directory/
application is handed over to JRun, and he just returns the completed
page to Apache to be served.

You could put the images in a different directory, outside the
JRun's application dir, but it will make your application much more
difficult to handle.

For these reasons I gave up with JRun and turned to Tomcat, that is
also for free.

Davide


--
The primary purpose of the DATA statement is to give names to
constants; instead of referring to pi as 3.141592653589793 at every
appearance, the variable PI can be given that value with a DATA
statement and used instead of the longer form of the constant. This
also simplifies modifying the program, should the value of pi change.
-- FORTRAN manual for Xerox Computers
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com