httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foster, Stephen \(ASPIRE\)" <steve.fos...@hmrcaspire.com>
Subject RE: [users@httpd] Serving local static content but proxying all others.
Date Tue, 20 Mar 2007 17:47:49 GMT
Hi josh,

thanks for your reply. I agree with your synopsis that it will be best to specify the static
content directories explicitly and then just proxy everything. It just means that if they
add any more static content directories then i'll have to add them to the exceptions list.

cheers for your help

Steve

-----Original Message-----
From: jslive@gmail.com [mailto:jslive@gmail.com]On Behalf Of Joshua
Slive
Sent: 20 March 2007 17:40
To: users@httpd.apache.org
Subject: Re: [users@httpd] Serving local static content but proxying all
others.


On 3/20/07, Foster, Stephen (ASPIRE) <steve.foster@hmrcaspire.com> wrote:

> I am happy with the ability to setup mod_proxy but i don't want to maintain a list of
URI's to be proxied in my apache configuration, likewise i don't want to have to re-configure
apache if the developers add new directories or content types to the DocumentRoot directory.
> Is it possible to configure apache to serve content if it exists locally but if not to
proxy it to a proxy server. I am basically trying to make the apache configuration as static
as we possibly can but flexible enought do differentiate between local content and what is
has to proxy.

Yes, you can do this using mod_rewrite.  But it is complicated and
involves checking the local filesystem on every request.

But I would highly recommend just setting aside one directory as being
local and excluding it from the ProxyPass:
ProxyPass /local !
and then proxying everything else.

Alternatively, proxy everything, including the static content, but
make sure it has proper cache-control headers and use mod_disk_cache
on the proxy to eliminate the speed hit.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message