Archive for May, 2009

Seemingly random 403 errors on Apache

May 21, 2009

At some point I realized that apache was giving seemingly random “403 Forbidden” errors. This when under high load and yet, not really high at all. I would be able to trigger it by reloading some page a few times quickly in a row or loading a page with a lot of images.

The problem was mod_evasive, a module designed to protect against DOS attacks. The above usage pattern was being categorised as an attack and rejected. This page explains the details and this page explains how to deal with it in Ubuntu.

I did have to loosen up some settings, namely:

  • DOSPageCount 10 (the number of pageviews allowed within DOSPageInterval secs)
  • DOSSiteCount 10000 (the number of object requests allowed within DOSSiteInterval secs, that is images, stylesheets, javascrip files ...)
Advertisements

Creating a debian/ubuntu meta package

May 11, 2009

This article explains how to create a DEB-style meta package.

Creating a personal APT repository

May 11, 2009

This guide seems to explain it all.

You may run into errors of the form:

$ reprepro -Vb . includedeb jaunty /path/to/package.deb
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$ reprepro -Vb . dumpreferences
Error: Distribution jaunty contains an architecture called 'all'.
There have been errors!
$

In that case, try removing all from the “architectures” line of nano conf/distributions.

Configuring subdomains

May 11, 2009

This article explains how to set up subdomains. Very easy, at least on Apache