[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: LocationMatch wildcard on 404
From:       "Will Fould" <willfould () gmail ! com>
Date:       2008-03-26 1:58:30
Message-ID: 4b3372230803251858j7dc135dcu4fe33cc43da036d5 () mail ! gmail ! com
[Download RAW message or body]

Wow - actually, I'm glad you asked - thanks a lot perrin:

Ultimately I think we're going this way with our new hardware, separating
all static items from the application servers:

 - have modperl app server send redirect for all static content to the load
balancer.
 - Nothing static exists on the modperl servers.
 - The static content is sitting on machines running apache.

I'm assuming the handler on the modperl machines will use the wildcard for
everything (except the application) and do the business of redirecting.

If this sounds reasonable (and assuming the static machines do not take
direct requests from the outside world), the modperl handler can auth and
create any request URI's for the static items.

Does this sound right?

If so, might something simple like <Location "/*"> on the modperl servers
work/scale efficiently for this purpose?


-W

On Tue, Mar 25, 2008 at 6:29 PM, Perrin Harkins <perrin@elem.com> wrote:

> On Tue, Mar 25, 2008 at 8:56 PM, Will Fould <willfould@gmail.com> wrote:
> > Can a LocationMatch "wildcard" trigger on a normal 404 or is there a
> better
> > way to do this?
>
> There are many ways.  Here are a few:
> - A custom ErrorDocument pointing to a URL that your perl code
> handles.  (The 404 approach you had in mind.)
> - A PerlTransHandler that checks for the existence of the directory
> and sets the handler as needed.  (The built-in handler for static
> files is called default-handler.)
> - mod_rewrite can check for the existence of a file path and do an
> internal redirect if it isn't found.
>
> If you have a separate front-end proxy, mod_rewrite on the front-end
> is probably the best way to go.  If you don't, a TransHandler is a
> good approach.  The 404 is fine, but gets sticky because you have to
> handle real 404s too.
>
> - Perrin
>

[Attachment #3 (text/html)]

Wow - actually, I&#39;m glad you asked - thanks a lot perrin:<br><br>Ultimately I \
think we&#39;re going this way with our new hardware, separating all static items \
from the application servers:<br><br>&nbsp;- have modperl app server send redirect \
for all static content to the load balancer. <br> &nbsp;- Nothing static exists on \
the modperl servers.<br>&nbsp;- The static content is sitting on machines running \
apache.<br><br>I&#39;m assuming the handler on the modperl machines will use the \
wildcard for everything (except the application) and do the business of \
redirecting.<br> <br>If this sounds reasonable (and assuming the static machines do \
not take direct requests from the outside world), the modperl handler can auth and \
create any request URI&#39;s for the static items.<br><br>Does this sound right?<br> \
<br>If so, might something simple like &lt;Location &quot;/*&quot;&gt; on the modperl \
servers work/scale efficiently for this purpose?<br><br><br>-W<br><br><div \
class="gmail_quote">On Tue, Mar 25, 2008 at 6:29 PM, Perrin Harkins &lt;<a \
href="mailto:perrin@elem.com">perrin@elem.com</a>&gt; wrote:<br> <blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Tue, Mar 25, 2008 at 8:56 PM, \
Will Fould &lt;<a href="mailto:willfould@gmail.com">willfould@gmail.com</a>&gt; \
wrote:<br>

&gt; Can a LocationMatch &quot;wildcard&quot; trigger on a normal 404 or is there a \
better<br> &gt; way to do this?<br>
<br>
</div>There are many ways. &nbsp;Here are a few:<br>
- A custom ErrorDocument pointing to a URL that your perl code<br>
handles. &nbsp;(The 404 approach you had in mind.)<br>
- A PerlTransHandler that checks for the existence of the directory<br>
and sets the handler as needed. &nbsp;(The built-in handler for static<br>
files is called default-handler.)<br>
- mod_rewrite can check for the existence of a file path and do an<br>
internal redirect if it isn&#39;t found.<br>
<br>
If you have a separate front-end proxy, mod_rewrite on the front-end<br>
is probably the best way to go. &nbsp;If you don&#39;t, a TransHandler is a<br>
good approach. &nbsp;The 404 is fine, but gets sticky because you have to<br>
handle real 404s too.<br>
<font color="#888888"><br>
- Perrin<br>
</font></blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic