Posts tagged: TIPS

Protecting the server with mod_evasive

As I hinted in my report several days ago about this server suffering a DOS attack, I’ve taken some measures to prevent a repeat occurrence. One of them was to install the mod_evasive Apache module, which was suggested by a number of people.

(There’s also mod_security. It’s way more complex than I need right now, but would be worth looking at for a busier server.)

Initially I was skeptical, since mod_evasive doesn’t seem to be a very actively maintained project. But it looked so simple I decided to give it a try. Installing via FreeBSD ports was, as usual, nearly instantaneous. Configuration looks like this (I’ve omitted a few settings for simplicity’s sake, and these are not the actual numbers I’m using):

In-place import using Subversion

Thanks to the helpful folks on the #svn IRC channel I learned that it is possible to turn a directory into a svn checkout in-place, i.e. without having to replace the directory itself with a fresh checkout after you svn import. This is very handy for things like /etc files and other stuff that you’d rather not be shuffling around unnecessarily.

The key nugget of info is here in the svn FAQ.

Managing a Django project using darcs

Preamble

This article is two things:

  1. A description of one way to use version control with a Django project
  2. An introduction to using the darcs distributed version control system in particular

First, though, a mini-sermon which someday will be a post in the You Really Should series: You really should use version control. Most of you probably do. But if you’re among those not using version control to manage your software projects, start now! Learn a good version control system and start using it on just one project. You’ll work so much more productively and confidently that you’ll want to use version control everywhere. If you’re just getting started, learn Subversion – it is more or less the standard at this point, and employers and other programmers will assume you know it.

Preparing for Y2K.007DST on FreeBSD

An energy conservation law from 2005 makes Daylight Savings Time (quaint US custom) begin earlier this year – this coming Sunday, to be exact. It’s supposed to be saving us energy, but I’m not sure if the upgrade costs were factored in. Anyway, I have a couple FreeBSD servers that needed the update. Went like this:

sudo portinstall misc/zoneinfo
sudo tzsetup

It took three times longer to find this information (buried at the bottom of this notice) than it did to implement the fix.

An IRC-specific Django FAQ

When I’m doing Django development work I sometimes find my way to the #django channel on freenode.net to exchange advice. As has been the case on the Interweb since ancient days, certain Questions are Frequently Asked there, so I decided to try the experiment of making a FAQ specifically addressing those questions. Hopefully it won’t be too redundant of other material in the wiki – but if it is, I’m sure the group refactoring intelligence will take care of it.