Make your own free website on Tripod.com

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>
    

  4. In your mt.cfg file, you will need to use the following settings:
    TemplatePath /path/to/mt/tmpl
    DataSource /path/to/db
    CGIPath http://my.server.com/mt/
    StaticWebPath /mt-static/
    ImportPath /path/to/mt/import
    

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

  5. Edit the default templates and replace every instance of mt-comments.cgi with comments; you will find this string in the following templates: Main Index Template, Individual entry archive template, Comment Listing Template, Comment Preview Template, and Comment Error Template.


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