Goodbye, MovableType with lighttpd

I’m going to change my setup pretty soon, but before I wash my hands of MovableType, I’m going to jot down my setup.

I’ve got MovableType running here with dynamic publishing (sort of), which serves both the epic as well as the e10th blog. The whole thing works quite nicely and supports a whole whack of things out-of-the-box, though the drawbacks make me want to shoot someone. One such drawback is the lack of documentation on how to get it going with anything other than Apache — I guess most peeps only ever use Apache for something as beastly as MT, which adds to my gut feeling that MT is a bit of an overkill.

Add to that the lack of good out-of-the-box themes and “templatesets,” and the last straw of its gross page previews (it makes directories and temp files but doesn’t clean up after itself), I’ve decided to give django a try again, this time with nginx (for no good reason other than to just try out something new). I’ll be trying byteflow as well, to get the epic up. I’ll probably run WordPress for e10th because I need more things running more quickly there.

Anyway, here is my current lighttpd.conf:

server.modules = (
             "mod_access",
             "mod_alias",
             "mod_accesslog",
             "mod_compress",
             "mod_rewrite",
             "mod_redirect",
 #           "mod_status",
 #           "mod_evhost",
 #           "mod_usertrack",
 #           "mod_rrdtool",
 #           "mod_webdav",
 #           "mod_expire",
 #           "mod_flv_streaming",
 #           "mod_evasive",
 "mod_cgi",
 "mod_fastcgi" )

server.document-root = "/home/fish/public" server.errorlog = "/var/log/lighttpd/error.log" index-file.names = ( "index.php", "index.html", "index.htm", "default.htm", "index.lighttpd.html" )

accesslog.filename = "/var/log/lighttpd/access.log" url.access-deny = ( "~", ".inc" ) static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) server.pid-file = "/var/run/lighttpd.pid"

server.dir-listing = "enable"

compress.cache-dir = "/var/cache/lighttpd/compress/" compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")

fastcgi.server = ( ".php" => ((  "bin-path" => "/usr/bin/php5-cgi",  "socket" => "/tmp/php.socket"  )) )

cgi.assign = ( ".cgi" => "/usr/bin/perl" )

$HTTP["host"] =~ "(^|.)thefishepic.ca$" {  server.document-root = "/home/fish/public/tfe"  server.errorlog = "/var/log/lighttpd/tfe_error.log"  index-file.names += ( "mtview.php" )  accesslog.filename = "/var/log/lighttpd/tfe_access.log"  server.error-handler-403 = "/mtview.php"  server.error-handler-404 = "/mtview.php" }

$HTTP["host"] =~ "(^|.)nicolb.c(a|o)(m)?$" {  server.document-root = "/home/nicolb/www/"  server.errorlog = "/var/log/lighttpd/nicolb_error.log"  accesslog.filename = "/var/log/lighttpd/nicolb_access.log" }

$HTTP["host"] =~ "(^|.)e10th.ca$" {  server.document-root = "/home/fish/public/e10th"  server.errorlog = "/var/log/lighttpd/e10th_error.log"  index-file.names += ( "mtview.php" )  accesslog.filename = "/var/log/lighttpd/e10th_access.log"  server.error-handler-403 = "/mtview.php"  server.error-handler-404 = "/mtview.php" }

handle Debian Policy Manual, Section 11.5. urls

by default allow them only from localhost

(This must come last due to #445459)

$HTTP["remoteip"] == "127.0.0.1" {  alias.url += (  "/doc/" => "/usr/share/doc/",  "/images/" => "/usr/share/images/" ) $HTTP["url"] =~ "^/doc/|^/images/" {  dir-listing.activate = "enable" } }

Obviously, I’m not worried about server load or anything. It’s just that lighttpd’s conf is a tad more intuitive than Apache and more than serves my needs. Not that I know exactly what I’m doing with lighttpd either… It’s mostly touchy-feely oh-I-guess-this-worked-somehow type stuff up there!

To get MT working, I used the error-handlers to serve up mtview.php and let it handle and show any dynamic errors. This was a problem with dir-listing enabled (would list dir instead of showing a category, for example), but I’ve disabled dir-listing for prosperity anyway.

You might also want to read:

  1. git woe: git checkout not resetting my file?!
  2. Apache with Coldfusion, PHP, and ruby on Ubuntu
  3. Server woes

Comments are closed.