You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@organic.com> on 1997/03/28 02:31:49 UTC
Proxy passing file types
One thing we've run into an interesting need to be able to support is the
ability to use the proxy code to relay a request for certain file types, rather
than just on a subdirectory basis like we have now. I.e.
http://www.apache.org/foo.jhtml
would get relayed to
http://jigsaw.apache.org/foo.jtml
or even
http://jigsaw.apache.org/template.class/foo.jtml
where jigsaw was used to create that page. ProxyPass right now works on the
subdirectory level, i.e.
http://apache.mirror.com/apache/ -> http://www.apache.org
(or even on /) but this is slightly different. The proxy code is looking for a
subdir to remove from the path to make the request, based on the second
argument to ProxyPass.
We modified the proxy code to not do this if the path doesn't being with / -
i.e.
ProxyPass .jtml http://jigsaw.apache.org/
This works like a charm. I'll submit this in a few days after some more
testing... I was just wondering if folks thought this was the right path to
take. We also tried
<Location *.jtml>
ProxyPass / http://jigsaw.apache.org/
</Location>
[apache.org used as an example]
But the server barfed on the config, saying "ProxyPass not allowed here".
Feedback would be cool.
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com www.apache.org hyperreal.com http://www.organic.com/JOBS
Re: Proxy passing file types
Posted by Chuck Murcko <ch...@topsail.org>.
Brian Behlendorf wrote:
>
> One thing we've run into an interesting need to be able to support is the
> ability to use the proxy code to relay a request for certain file types, rather
> than just on a subdirectory basis like we have now. I.e.
>
> http://www.apache.org/foo.jhtml
>
> would get relayed to
>
> http://jigsaw.apache.org/foo.jtml
>
> or even
>
> http://jigsaw.apache.org/template.class/foo.jtml
>
> where jigsaw was used to create that page. ProxyPass right now works on the
> subdirectory level, i.e.
>
> http://apache.mirror.com/apache/ -> http://www.apache.org
>
> (or even on /) but this is slightly different. The proxy code is looking for a
> subdir to remove from the path to make the request, based on the second
> argument to ProxyPass.
>
> We modified the proxy code to not do this if the path doesn't being with / -
> i.e.
>
> ProxyPass .jtml http://jigsaw.apache.org/
>
> This works like a charm. I'll submit this in a few days after some more
> testing... I was just wondering if folks thought this was the right path to
> take. We also tried
>
> <Location *.jtml>
> ProxyPass / http://jigsaw.apache.org/
> </Location>
>
> [apache.org used as an example]
>
> But the server barfed on the config, saying "ProxyPass not allowed here".
>
> Feedback would be cool.
>
There seem to be lots of requests to do this and more with the proxy,
including rewriting pages passing through the proxy. This sounds like a
start, and worth including in 1.2.1. The proxy will get largely
rewritten for 2.0, so per dir equivalent of this (as Dean suggested)
would be a nice thing to have.
--
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org
Re: Proxy passing file types
Posted by Dean Gaudet <dg...@arctic.org>.
I tend to lean towards a per_dir_config fix as something more general (so
that you could use <Files> or <Location>). But there'll be a need to
control overrides of it in .htaccess because otherwise people might easily
create tunnels to stuff behind firewalls.
Dean
On Thu, 27 Mar 1997, Brian Behlendorf wrote:
>
> One thing we've run into an interesting need to be able to support is the
> ability to use the proxy code to relay a request for certain file types, rather
> than just on a subdirectory basis like we have now. I.e.
>
> http://www.apache.org/foo.jhtml
>
> would get relayed to
>
> http://jigsaw.apache.org/foo.jtml
>
> or even
>
> http://jigsaw.apache.org/template.class/foo.jtml
>
> where jigsaw was used to create that page. ProxyPass right now works on the
> subdirectory level, i.e.
>
> http://apache.mirror.com/apache/ -> http://www.apache.org
>
> (or even on /) but this is slightly different. The proxy code is looking for a
> subdir to remove from the path to make the request, based on the second
> argument to ProxyPass.
>
> We modified the proxy code to not do this if the path doesn't being with / -
> i.e.
>
> ProxyPass .jtml http://jigsaw.apache.org/
>
> This works like a charm. I'll submit this in a few days after some more
> testing... I was just wondering if folks thought this was the right path to
> take. We also tried
>
> <Location *.jtml>
> ProxyPass / http://jigsaw.apache.org/
> </Location>
>
> [apache.org used as an example]
>
> But the server barfed on the config, saying "ProxyPass not allowed here".
>
> Feedback would be cool.
>
> Brian
>
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> brian@organic.com www.apache.org hyperreal.com http://www.organic.com/JOBS
>
>