RubyForge virtual host definitions

02 Apr 2008

This is a little silly, but, hey. Until this evening, all 5500+ RubyForge virtual host definitions have been embedded in one massive httpd.conf. So httpd.conf was up to around 1.5 MB, or in terms of line count:

$ wc -l /usr/local/apache2/conf/bkp.httpd.conf
71045 /usr/local/apache2/conf/bkp.httpd.conf

Nice, huh? Yikes. Anyhow, I finally buckled down to moving all the vhosts into separate files in a subdirectory and doing an Include *.conf. Although I've put this off for a _long_ time, it only took about 15 minutes, makes the project management code simpler, and also makes a couple things - like project deletion - a bit easier to automate. The only tricky bit is backing up all those files... but come to think of it, 99% of them are exactly the same (or could be generated) and thus don't need to be backed up. The only outliers are vhosts like, which has a RewriteMap to support gem mirroring.

So often this seems to be the case... if I can just buckle down to a job it ends up being quicker and more enjoyable than I thought. 'In every job that must be done there is an element of fun....'.

All that said, if you notice something awry with a RubyForge virtual host, please drop me a line - I might have missed something, thanks!