Richard Jones wrote:
However, the URLs constructed in the templates from Catalyst.uri_for pick up the port number, thus defeating the idea of ProxyPass. In one of
Replying to my own post, but for the benefit of closure, and for anyone else who might stumble over this one in future, I've fixed it.
The main reason for the apparent failure to remove the backend server port from uri_for was that the $host variable in Catalyst::Engine::Apache::prepare_path ($self->apache->hostname) was set to the IP address of the backend server, not localhost/127.0.0.1. So PROXY_CHECK was skipped and the requesting url + port were passed through unchanged as $host for eventual inclusion in $c->request->uri and $c->request->base. Easily fixed by setting using_frontend_proxy => 1 in the app config.
The clues were all there had I but realised - the lack of X-Fowarded-Host was a red-herring as I was looking at the result of requests made with url's containing the backend port, so of course it wasn't set! We live and learn.
-- Richard Jones _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
