[Catalyst] Setting $c->req->{base}

Alessio Bragadini alessio at sevenseas.org
Mon Sep 19 22:55:17 CEST 2005

Hi all,
I am stumbling on a problem with my Catalyst setup, and maybe I am
overlooking something obvious. I have a dual-server setup using Apache,
a frontend server on port 80 with mod_proxy/mod_rewrite and a backend
server on port 8080 with mod_perl. In the production environment they
will also be on different machines (this is a fairly common setup).

However, $c->req->{base} gets set automatically in
Catalyst::Engine::HTTP::Base::prepare_path to
http://backend.machine:8080/ instead of the path I want to show to the
users. This ends up in templates if I use [% base %] but unfortunately
also in cookies and self-referencing URLs.

I don't see any obvious way to fix this, and especially I cannot easily
figure out at which point of the request cycle it would be better to
act. Any help, or directions for a possible plugin, would be much

Alessio Bragadini <alessio at sevenseas.org>
Sevenseas.org Hacking Community

More information about the Catalyst mailing list