Using RewriteMap and DBM files for mass Apache redirects

Its not that unusual to need a large number of redirects in Apache, and even if you’ve been following best practice and keep sites in separate vhost files, a couple of rounds of redirects can leave your files bloated, messy and just that little bit more difficult to maintain.

The Apache RewriteMap directive allows you to create a ‘function’ which can then be called in RewriteCond and RewriteRule rules. Basically it means you don’t need to explicitly state each rule in your vhost files.

It works by allowing you to specify an external map once in your file using the following syntax:
RewriteMap mapname maptype:maplocation
mapname – being the the name you’ve given to your external mapfile [Read more…]

Compiling subversion 1.7.1 from source with SSL

If you need to install Subversion 1.7.1 to a server with SSL support, here’s a quick routine to get that done.

Download the latest version
cd /usr/local/src
tar -zxvf subversion-1.7.1.tar.gz
cd subversion-1.7.1

Use the in-built script to download the required dependencies, and configure neon for SSL
cd /neon/
./configure --with-ssl
make install
cd ..

Download and install the required sqlite3.c
tar xvzf sqlite-amalgamation-
mkdir /sqlite-amalgamation/
cp sqlite- /usr/local/src/subversion-1.7.1/sqlite-amalgamation/

Configure & make Subversion
./configure --with-neon=/usr/lib64/
make install

if you’ve used default install locations, add to path
export PATH=$PATH:/usr/local/bin