« Table of Contents



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:

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

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:
    use lib '/path/to/mt/lib';
    use lib '/path/to/mt/extlib';
    PerlModule MT::App::CMS
    <Location /mt/app>
    SetHandler perl-script
    PerlHandler MT::App::CMS
    PerlSetVar MTConfig /path/to/mt.cfg
    PerlModule MT::App::Comments
    <Location /mt/comments>
    SetHandler perl-script
    PerlHandler MT::App::Comments
    PerlSetVar MTConfig /path/to/mt.cfg
    PerlModule MT::App::Trackback
    <Location /mt/trackback>
    SetHandler perl-script
    PerlHandler MT::App::Trackback
    PerlSetVar MTConfig /path/to/mt.cfg
    PerlModule MT::App::Search
    <Location /mt/search>
    SetHandler perl-script
    PerlHandler MT::App::Search
    PerlSetVar MTConfig /path/to/mt.cfg
    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

    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
    StaticWebPath /mt-static/
    CommentScript comments
    TrackbackScript trackback
    SearchScript search
    XMLRPCScript xmlrpc

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

Copyright © 2001-2003 Six Apart. All Rights Reserved.