holli has asked for the wisdom of the Perl Monks concerning the following question:

Brothers,
I am developing a Catalyst based application. I now have a prototype running, and it's time to move it to a real webserver. I have a fresh Apache with mod_perl 2 running, but now I don't know how to proceed.
These are most urgent questions. More of them will probably rise in the process.


holli, /regexed monk/
  • Comment on Move Catalyst web app from builtin testing server to Apache

Replies are listed 'Best First'.
Re: Move Catalyst web app from builtin testing server to Apache
by shiza (Hermit) on Mar 24, 2006 at 20:43 UTC
    - Where do I put which files from the app?

    I believe your modules are installed in the lib directory. Move them to a location that is accessible by your Perl installation. You will probably want to relocate your templates as well and reconfigure your View with the new location.

    You'll also need to update your application class to tell it to use the Apache engine:
    use Catalyst qw/-Engine=Apache/;


    - How do I tell Apache to map urls to Catalyst?

    I believe the Catalyst dispatcher handles this for you.

    Here's a basic example of a Vhost configuration:
    <VirtualHost _default_:8000> ServerAdmin webmaster@example.com ServerName catalyst.example.com ErrorLog logs/catalyst.example.com-error_log CustomLog logs/catalyst.example.com-access_log common PerlModule My::App <Location /> SetHandler perl-script PerlResponseHandler My::App </Location> </VirtualHost>

    - My program needs to acess a shared drive. Will 'c:\path' still mean the same for my app when it runs under the Webserver?

    I don't see any reason why this would be an issue.

    You will need to install Catalyst::Engine::Apache2 if it isn't already.

Re: Move Catalyst web app from builtin testing server to Apache
by Anonymous Monk on Mar 24, 2006 at 14:48 UTC
Re: Move Catalyst web app from builtin testing server to Apache
by ghenry (Vicar) on Mar 30, 2006 at 08:26 UTC

    See the main doc Catalyst::Engine::Apache2::MP20

    Walking the road to enlightenment... I found a penguin and a camel on the way.....
    Fancy a yourname@perl.me.uk? Just ask!!!