Movable Type User Manual: ALTERNATE ENVIRONMENTS

« Table of Contents


ALTERNATE ENVIRONMENTS

mod_perl

Movable Type can run under mod_perl in either Registry mode or as a set of full-fledged handlers. NOTE that in order to run under mod_perl, you must have Apache::Request and Apache::Cookie installed; these modules comprise the libapreq distribution, which can be downloaded from here:

http://www.movabletype.org/cpan/cpan-libapreq.tar.gz

Setting up MT under Registry is just like setting up any other CGI script under Registry; add the following to your httpd.conf:

PerlModule Apache::Registry
<Location /path/to/mt>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
</Location>

You will need to host your docs, images, and styles.css files in another directory outside of /path/to/mt, just as if you had placed MT into the cgi-bin. See Troubleshooting for more details.

If you want even more speed, consider running Movable Type to run as a mod_perl handler. You will need to set up two handlers: one for the main application, and one for your front-end comments.

  1. Install Movable Type normally, and run mt-load.cgi to initialize the databases.

  2. Set up your images, docs, and styles.css in a web-accessible directory not under /mt/. See Troubleshooting for more details.

  3. Add the following to your httpd.conf:
    <Perl>
    use lib '/path/to/mt/lib';
    </Perl>
    PerlModule MT::App::CMS
    <Location /mt/app>
    SetHandler perl-script
    PerlHandler MT::App::CMS
    PerlSetVar MTConfig /path/to/mt.cfg
    </Location>
    PerlModule MT::App::Comments
    <Location /mt/comments>
    SetHandler perl-script
    PerlHandler MT::App::Comments
    PerlSetVar MTConfig /path/to/mt.cfg
    </Location>
    PerlModule MT::App::Trackback
    <Location /mt/trackback>
    SetHandler perl-script
    PerlHandler MT::App::Trackback
    PerlSetVar MTConfig /path/to/mt.cfg
    </Location>
    PerlModule Apache::XMLRPC::Lite
    PerlModule MT::XMLRPCServer
    <Location /mt/xmlrpc>
    SetHandler perl-script
    PerlHandler Apache::XMLRPC::Lite
    PerlSetVar dispatch_to "blogger, metaWeblog, mt"
    PerlSetVar MTConfig /path/to/mt.cfg
    </Location>
    

    Note that, as an alternate to the use lib statement above, you could also use

    PerlSetEnv PERL5LIB /path/to/mt/lib
    

  4. In your mt.cfg file, you will need to use the following settings:
    DataSource /path/to/db
    CGIPath http://my.server.com/mt/
    StaticWebPath /mt-static/
    CommentScript comments
    TrackbackScript trackback
    SearchScript search
    

    StaticWebPath should correspond to the URI you set when setting up your images, docs, and styles.css (in Step 1).


Copyright © 2001, 2002 Ben Trott and Mena Trott. All Rights Reserved.