KT.
KT.

Reputation: 11430

How to configure the base url of a Catalyst application?

I have developed a Catalyst application, which runs via the catalyst development server at, say, localhost:3000. Next I configured Apache to proxy requests to http://myhost/myapp/ to localhost:3000 using mod_proxy.

I would now like Catalyst to know that it has been publicly relocated to the base url myapp/ and take it into account when forming URLs via uri_for.

How can I do it?

Upvotes: 2

Views: 925

Answers (1)

UrsaDK
UrsaDK

Reputation: 865

KT, the easiest thing to do is to install Catalyst::TraitFor::Request::ProxyBase, as it is specifically designed to replace request base with the value passed by HTTP proxy.

The module is completely transparent and requires no modification of the existing app.

Upvotes: 1

Related Questions