[Catalyst] adding my_app_name to action paths

J. Shirley jshirley at gmail.com
Fri Jul 3 13:34:42 GMT 2009

On Fri, Jul 3, 2009 at 4:15 AM, Mike Glen <mike.glen at mindsweep.net> wrote:

> J. Shirley wrote:
>  On Wed, Jul 1, 2009 at 8:43 AM, Mike Glen <mike.glen at mindsweep.net<mailt=
>> mike.glen at mindsweep.net>> wrote:
>>    I'm trying to setup a catyst app to run behind nginx so that the
>>    app is accessed at http://my.server.com/my_app_name/
>>    I have set this up following instructions at
>> http://dev.catalyst.perl.org/wiki/adventcalendararticles/2008/02-catalys=
>>    I can get the requests passed through to catalyst running the
>>    http::prefork engine but I haven't found a simple way to add
>>    my_app_name to the beginning of each action's path.
>>    Is there a simple way to do this?
>>    I'd like to be able to do this in the config file if possible
>>    Thanks
>> It should happen automatically, provided you have set the
>> "using_frontend_proxy" option.  Are you setting that correctly?
>> -J
> I have managed to get this to work by using the Catalyst::Plugin::Setenv
> and adding SCRIPT_NAME my_app_name to the config file so that this is used
> to generate the correct $c->request->base.
> I don't believe this is the right way to do it though. Anyone got any
> pointers?
> Thanks
> Mike


Sorry for no responding yesterday, had a full day.  You can set the proxy
header directly, just using:

proxy_set_header SCRIPT_NAME /my_app/;

That should do the trick, but may be missing something.  I have a working
config on a system that is currently sitting in an Apple store repair
facility :/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20090703/25de6=

More information about the Catalyst mailing list