Jim Moy

4/7/2002

MovableType 2.0 & mod_perl

Filed under: — jbm @ 12:53 am

I’ve got MovableType 2.0 running under mod_perl, with good performance enhancements. But I needed to make a couple of changes to my server that apparently aren’t needed in a more vanilla setup.

The machine running MT is on Mandrake 8.1 which installs an Advanced Extranet configuration of Apache that I’ve updated with the latest security fixes, of course. It splits the server into two logically separate servers, one that handles normal requests for performance, and another that handles the mod_perl requests. The expected configuration setup as documented by MT is fine, but I also had to tweak the portion of the httpd.conf file dealing with the URL rewrite of the requests that are redirected to the httpd-perl instance:

RewriteRule ^(.*/mt/.*.cgi)$ http://localhost:8200$1 [P]

I also needed to add a statement to get the MT libraries located by the Perl @INC list, though I haven’t heard back on whether this is specific to my configuration, or required for any MT/mod_perl setup. The documentation says that @INC is frozen when the server starts up, so it would see like this affects everyone because mt.cgi tries to modify that list. This goes in httpd-perl.conf:

PerlSetEnv PERL5LIB /var/mt/lib

No More Hangs on Comments

Filed under: — jbm @ 12:39 am

Just a bit of housekeeping: I had a configuration problem that prevented the comment feature on the web log from functioning properly. It wasn’t MovableType’s fault, I just tried to have it talk to a server it couldn’t contact. The symptom was that a person making a comment on an entry would successfully post the article, but their browser hung as if the operation failed. Then they’d try again and I’d end up with multiple, duplicate comments.

MT tries to send me email every time someone makes a comment to a weblog entry. In my case, I had the SMTP server address configured with a name that resolved to a public address. However, my server is on a DMZ and the firewall was preventing connections from the internal network. So although outgoing packets were being passed just fine (the email server works fine, relaying outgoing mail), the dropped incoming packets made it appear as if the mail operation was hung, and prevented the MT process from completing the mail delivery.

Simple fix: change the configuration to point to the internal network name of the server instead of the publicly resolved address.

Powered by WordPress