in reply to Automatic webserver config file generation
Config::General uses a configuration file format that's strikingly close to the Apache's. I'm not sure it's entirely compatible, but it is probably worth looking into. The interface is pleasantly simple.
If you stick with your Template Toolkit approach, its ttree tool can be used to handle the build process, although you still need to cook something up for testing.
Makeshifts last the longest.