You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Craig Dickson <cd...@aol.com> on 2004/09/17 01:34:11 UTC

[users@httpd] Precedence between ProxyPass and AliasMatch

We have an Apache 2 server sitting in front of a WebLogic server (used
for J2EE application hosting).

We have a significant amount of static content that we would like to be
served by Apached instead of Weblogic. Ideally we would like to make no
modifications to our J2EE app running on WebLogic, so that it can
function with or without Apache being present. In other words, all of
the configuration needs to be done at the Apache level.

 From the Apache documentation it would appear we can use a combination
of the ProxyPass and the AliasMatch directives to achieve what we want
to do. For example, in our httpd.conf file, we would put something like
the following to serve static images:


AliasMatch   /myapp/(.*).jpg   /wwwroot/myapp/$1.jpg

ProxyPass   /myapp/   http://localhost:7001/myapp/


Our major concern is the order in which these directives will be
processed. Is there any documentation on this anywhere? I could not find
any on this specific case. Is there a general precedence rule that
applies instead? Clearly if the ProxyPass directive is evaluated before
the AliasMatch directive, the static content will be served by WebLogic
and not from Apache.

Thanks for your help,
Craig



---------------------------------------------------------------------
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


Re: [users@httpd] Precedence between ProxyPass and AliasMatch

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 16 Sep 2004 16:34:11 -0700, Craig Dickson <cd...@aol.com> wrote:

> AliasMatch   /myapp/(.*).jpg   /wwwroot/myapp/$1.jpg
> 
> ProxyPass   /myapp/   http://localhost:7001/myapp/
> 
> Our major concern is the order in which these directives will be
> processed. Is there any documentation on this anywhere? I could not find
> any on this specific case. Is there a general precedence rule that
> applies instead? Clearly if the ProxyPass directive is evaluated before
> the AliasMatch directive, the static content will be served by WebLogic
> and not from Apache.

I would guess that the ProxyPass is going to take precedence.  The
only way to know for sure is to test it or to check the ordering on
the hook functions in the source code.

But for a problem like this, I would suggest using mod_rewrite which
can perform both functions and can explicitly specify ordering.

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