MurkyGoth's Mutterings

You don’t know what you’ve got ’til it’s gone…

September 3rd, 2008 by murkygoth

Never one to sit in my comfort zone, I enjoy finding out about new things. Sometimes I find something better, sometimes I want to drink to forget…

I’m predominantly a Linux user (Debian GNU/Linux FTW!) but I’ve started to look at FreeBSD to see what all the fuss is about. Recently, I landed some extra work, hosted on FreeBSD, so it was a perfect opportunity.

First of all, Apache. Okay, I can understand why it might get installed under /usr/local, and I can live with that, but coming from Debian, the config files are horrific.

Debian uses a nice split-file config format:

apache2.conf : main configuration file
conf.d/ : Addition configuration snippets
envvars : Environment variables to add to the server
httpd.conf : Empty file on my system – I guess it’s there just to stop malicious people creating and dumping junk in there
mods-available/ : Loader and configuration snippets of all available modules
mods-enabled/ : Symlinks to the files above for modules that are turned on
ports.conf : List of IP addresses and ports to listen on
sites-available/ : Configuration snippets for hosts and virtual hosts
sites-enabled/ : Symlinks to the files above for sites that are enabled

All nice and easy, especially when creating new vhosts – just create a new file in ‘sites-available’ and use ‘a2ensite’ to enable it. Makes it quick and easy to see what modules and sites are enabled – just list the ‘*-enabled’ directory.

FreeBSD does it…differently. Gone are the ‘mods-*’ directories – module loading is part of the main httpd.conf file, which makes it a bit more tricky to see which ones are loaded (grep helps). The main gripe I have, however, is the single configuration file to hold all of the vhosts – for even a moderately busy server, this file is going to get quite big quite quickly, and it also means you can’t use the handy ‘a2ensite’/’a2dissite’ commands to easily enable and disable vhosts. It’s not the end of the world, but takes some getting used to this (IMHO) inferior configuration system – if you want to have disable a site, you need to either regenerate the whole file from a database or group of files, or do some sed-fu to comment out the particular vhost (and I’m not even sure sed is up to the task…)

For an OS that prides itself in the webserver arena, I’m extremely surprised that this convenience is left to the SysAdmin to implement on their own, instead of being standard, like Debian.

And don’t even get me started on the whole -RELEASE, -CURRENT and -STABLE thing…

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.