I did something useful yesterday, other than just working. Actually, I did a few things, but this only concerns two of them.
Wednesday night, I was making some changes to the natd configuration file on Saturn (soon to be renamed, but that's another story). I made a mistake that I've made several times before. I forgot to add a blank line at the end of the configuration file. Even though there is absolutely no need for it to be there, the code enforces it anyway. To fix the problem, because natd wouldn't restart and I no longer had remote access to the server, I had to drive the ten minutes to work, sit in the parking lot to type 34 keystrokes to fix it and drive back. (I counted the keystrokes involved on the way back.)
I have wireless access that I can (just barely) access from the parking lot (and yes it uses some security), but that still involves driving to work if I make the mistake remotely. This is the third or fourth time I've had to drive to work to fix it in the last 2 years, so I wasn't happy.
When I got to work yesterday morning, I finally sat down with the code to natd. As I suspected, there really is no reason for it to check for a newline at the end. All it does is convert it to a null character (C's end of string character).
I made a quick patch to the file and submited a problem report to the FreeBSD project with my patch. I really hope it makes it into the code because I really hate that behavior. And also because then I can say I wrote part of FreeBSD, even if it is only like 3 lines.
I also submitted an upgrade to a port I submitted a couple months ago. The developer released a small revision, so as the maintainer of the port, I felt obligated. It only took about 20 minutes (and most of that was looking up how to submit a maintainer-update because I'd never done one before.
As a side note, I just submitted two more ports from the CPAN database for the same reason.
The module doesn't require any patches or anything to install on FreeBSD so I figured it would be pretty straightforward. After reading through the FreeBSD Porter's Handbook, it really was. I've got the package on both my FreeBSD servers so that it can be upgraded from portupgrade automagically. I've also submitted the port to the FreeBSD ports collection. We'll just have to see how long it takes for them to add it.
I've been trying to figure out a way to effectively create backups of our webservers content and configuration and have multiple days worth of backups. I finally came across an article about using rsync for "incremental" backups. The concept is interesting to me because it only does a "full" backup once, but it appears like multiple full backups.
So I've got the server set up and I'm migrating websites to it. I've got most of them moved (the easy ones) and I'm working on the others. On the 17th website I ran into a problem. Apache would just crash on me. It was weird.
Every time I create a new website on the server, it adds the www user that Apache runs under to the domain's group. Apparently, FreeBSD has a limit of 16 groups that a user can be a member of by default. It's a little variable to change in /usr/src/sys/sys/syslimits.h. I set it up to 50, but now I've got to recomiple the whole operating system to make it work. If only it would let me change it on the fly. Silly programmers.
I've been working on Uranus (let the jokes fly), our new web server, this weekend. I'm trying to get it set up properly from the beginning to aid in the virtual hosting. I've learned a lot from working on Golem, but it helps to not have a hodge podge of methods for adding domains to the server. The solution: A Hosting Control Panel.
Over the last few weeks, I've been evaluation free hosting control panels. Almost every single free one that would work for FreeBSD sucked. I saw a couple potential pay ones, but don't have the money to do that at the moment. I've decided for now to stick with Webmin+Virtualmin. It's a free solution and has a lot of configuration options. I'll post later to document how it actually works when done right from the beginning.
So I'm setting up our new web server. I'm trying to get the stupid frontpage extensions installed and working. Last time, I had the same problem and I documented some of the things I tried. I failed to document the actual fix though. It was funny because my post came up on a google search for a solution. I have since found the solution and updated my previous post.