Skip to content

WordPress Permalink Support: FreeBSD + Lighttpd


I love FreeBSD for how efficient and minimalistic it can be.  For my web servers I like to add to this efficiency by using Lighttpd instead of the larger, older, Apache.

The one little issue with Lighttpd vs Apache is getting all the same module support setup for all the little tweaks that you’ve come to enjoy.

I should mention that Lighttpd supports many of the same modules that Apache does, and once you learn how they work I think they are even more intuitive than Apache’s config.  One of the most important to me is the mod_rewrite for use with my WordPress blogs.  As you can see from the URL I use fancy addresses for my posts.  %date%/%name%, etc.  I think this is more user friendly (not to mention Google-friendly) than something like php?=53.  What kind of URL is that?

In any case, a very simple way to achieve this in Lighttpd is to use the following single line in your lighttpd.conf file:

## added for WP pretty URLs<br /> server.error-handler-404 = "/index.php"

Again, I’d argue this is much simpler than a dozen lines in an .htaccess file and gives you the same results.  It’s like magic!

Perhaps I’ll do a few more posts regarding other aspects of Lighttpd configuration as it compares to Apache.  Things like mod_redirect, mod_auth, mod_alias, etc.  Until then, if you haven’t tried out Lighttpd you really should!

Related Posts

  1. New Theme
  2. Weekly Update Notifications via Portmaster
  3. dhcpd inside ezjail
  4. FreeBSD 7.0 – Wireless Encyption With WPA-PSK
  5. FreeBSD 7.0 – Finding and Loading the Correct Sound Driver
  6. FreeBSD 7.0 – Update The Boot Delay (Faster Boot)
  7. Putting Beastie Back In The Boot Menu