Some of us techies have to maintain 50 or more webservers, which usually leads to in-house Linux distros. With Apache, you could throw in .htaccess for each website without having to change base system. It’s not that simple with Lighttpd, that’s why I needed some script to join global configuration file with a local one. Some perl coding and it’s ready:

http://rotanovs.com/lighttpd/joincfg

Instructions:

  1. Install Tie-IxHash perl module:
    • Gentoo users: emerge Tie-IxHash
    • Other distros:
      perl -MCPAN -eshell
      cpan> install Tie::IxHash
  2. Backup your configuration
  3. Call joincfg like follows, then start lighttpd:
    joincfg global.conf local.conf > new.conf
    lighttpd -f new.conf

As usually, NO WARRANTIES!