Run Movable Type with nginx and PSGI
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Run Movable Type with nginx and PSGI on Debian

1. Debian

  1. Install cpanminus:
curl -L | perl - --sudo App::cpanminus`
  1. Install Perl modules:
cpanm Task::Plack XMLRPC::Transport::HTTP::Plack Starman
  1. Place in /etc/init.d mt-starman:
wget -P /etc/init.d
  1. Change permissions:
chmod +x /etc/init.d/mt-starman
  1. Change variables (DIR, SCRIPT, USER, GROUP, WORKERS) in /etc/init.d/mt-starman.

  2. Add mt-starman to Debian autostart:

update-rc.d mt-starman defaults

If you use Debian Squeeze (and above):

insserv mt-starman

2. nginx

  1. Add to nginx.conf (http section):
upstream starman {
  1. Add to nginx site config (server section):
location /cgi-bin/mt/ {
    proxy_set_header        Host $http_host;
    proxy_set_header        X-Forwarded-Host $host;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass      http://starman;

3. Movable Type

  1. Add to mt-config.cgi:
PIDFilePath /var/run/
  1. Also you can add this in mt-config.cgi (for beautiful url's without extensions):
AdminScript app
CommentScript comments
TrackbackScript trackbacks
SearchScript search
XMLRPCScript xmlrpc
AtomScript atom
UpgradeScript upgrade


Run this command to start Starman and restart nginx:

/etc/init.d/mt-starman start && /etc/init.d/nginx restart