[Catalyst] Anyone using ProxyPass?
Bill Moseley
moseley at hank.org
Mon Jul 2 21:01:16 GMT 2007
On Mon, Jul 02, 2007 at 07:46:41PM +0100, Richard Jones wrote:
> >
> >Which ends up setting the request base, which is used in uri_for.
> $c->log->info( Dumper $c->request->header( 'X-Forwarded-Host' ) ) in a
> controller dumps an empty string. Is this correct?
No. I just started my app with front end listening on port 85 and the
back end on 10085 -- I have a startup script that add 10,000 to the port
number for the back-end by default. ;)
moseley at bumby:~$ sudo netstat -ltp | grep '85 '
tcp 0 0 localhost:10085 *:* LISTEN 30585/apache2
tcp 0 0 *:85 *:* LISTEN 30577/apache2
Then in my app auto() I added:
warn join "\n",
"request = " . $c->req->uri,
$c->request->header( 'X-Forwarded-Host' ),
$c->uri_for( '/foo' ),
'';
And I get:
$ GET http://bumby:85/foo.html >/dev/null
request = http://bumby:85/foo.html
bumby:85
http://bumby:85/foo
So, that's correct.
> >Is your front end machine on the same host? If not you would likely
> >need to set $c->config->{using_frontend_proxy} per the docs.
> Yes, both Apache servers (:80 and :81) are on the same host. I've still
> no idea what is wrong here.
Throw in some warn statements in Catalyst::Engine::Apache.
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list