[Catalyst] Anyone using ProxyPass?

Jason Kohles email at jasonkohles.com
Tue Jul 3 17:09:17 GMT 2007


On Jul 3, 2007, at 11:21 AM, Bill Moseley wrote:

> On Tue, Jul 03, 2007 at 11:24:34AM +0100, Richard Jones wrote:
>> 1) There is definitely no $c->request->header('X-Forwarded-Host')
>
> Check if you have X-Forwarded-For.
>
Also check the version of Apache if you are running 1.3, this wasn't
added until 1.3.25.

>
> Let's see, I have not looked at this in a while but in apache2 I have:
>
>     LoadModule proxy_module         /usr/lib/apache2/modules/ 
> mod_proxy.so
>     LoadModule proxy_http_module    /usr/lib/apache2/modules/ 
> mod_proxy_http.so
>
>     ProxyVia            On
>     ProxyReceiveBufferSize 16384
>
> I guess I'm using mod_rewrite to figure out what does or doesn't need
> to be sent to the back end -- so after all my rewrite rules and
> conditions I have:
>
>         # Proxy everything else
>         RewriteRule (.+) http://127.0.0.1:10085$1 [proxy]
>
> After that I guess you are stuck figuring out why you are not getting
> that header.
>
>
>
>> 2) In Catalyst::Engine::Apache::prepare_path, $host = the IP  
>> address of
>> the server (not localhost or 127.0.0.1), and $port = 81.
>
> Did you see this code?
>
>     PROXY_CHECK:
>     {
>         my $headers = $self->apache->headers_in;
>         unless ( $c->config->{using_frontend_proxy} ) {
>             last PROXY_CHECK if $c->request->address ne '127.0.0.1';
>             last PROXY_CHECK if $c->config->{ignore_frontend_proxy};
>         }
>         last PROXY_CHECK unless $headers->{'X-Forwarded-For'};
>
>         # If we are running as a backend server, the user will  
> always appear
>         # as 127.0.0.1. Select the most recent upstream IP (last in  
> the list)
>         my ($ip) = $headers->{'X-Forwarded-For'} =~ /([^,\s]+)$/;
>         $c->request->address( $ip );
>     }
>
> If your address isn't 127.0.0.1 then it's not going to check for a
> proxy unless "using_frontend_proxy" is set.
>
> -- 
> Bill Moseley
> moseley at hank.org
>
>
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ 
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>

-- 
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire





More information about the Catalyst mailing list