kieranbarnes Independent PHP, WordPress & CubeCart Programmer

Ridiculously simple NTLM Authentication for Apache (Ubuntu)

Posted on March 9, 2010

We all know Ubuntu makes things amazingly simple. This is the best I've found so far. NTLM authentication in Apache used to take a while to setup, it used to be tricky, fiddly - generally a bit hit and miss.

Tagged as: Continue reading

mod_geoip Revisted including stopping spam in phpBB 2

Posted on February 15, 2010

I've recently moved a client's forum onto a new cPanel server, previously it was on a home-brew Ubuntu server.
So I had to install mod_geoip onto cPanel in CentOS. It wasn't as bad as I was expecting.

First off, we need to download the GeoIP libraries.

SEO Friendly URLs for CubeCart in Windows

Posted on November 27, 2009

I have a client hosting CubeCart on a Windows server. Unfortunately the built in Apache 2 mod_rewrite rules that come bundled with CubeCart don't work in IIS/Helicon.

Simple fix...

NTLM Authentication for apt-get’ed Ubuntu

Posted on November 4, 2009

Following on from NTLM Authentication on Ubuntu and Apache2 Revisited this morning, this is how we modify the Apache2 configuration provided by apt in Ubuntu.

NTLM Authentication on Ubuntu and Apache2 Revisited

Posted on November 4, 2009

It's been a while since I've had to build an NTLM integrated Apache2 server.
So I thought I'd take help from Ubuntu's packages and install LAMP from there like most people seem to be doing these days.

Once all that is up and running, you will need to download mod_ntlm_winbind. Its an ancient package I complied years ago from the samba source tree, good news is it still works.

Block Countries in Apache

Posted on November 18, 2008

Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines of code.

I had a client who was experiencing an inhumane amount of spam on their phpBB forums, which are notorious for bot attacks. Luckily this forum was geographically specific - so we can block all the countries we aren't interested in.

Site Performance Quick Fixes

Posted on July 31, 2008

I've been playing around with YSlow for a while now, now I decided to a quick test on this blog.

This blog, according to YSlow rates a frumpy Grade D, with a score of 61. Not bad, but not great.
A bit of .htaccess trickery should give me a few extra points... Excellent Grade C, with a score of 73.

.htaccess redirect based on requested domain

Posted on April 28, 2008

Imagine you have a selection of domain names that point to the same site, are some of those domains specific to certain areas of your site?

Here's how I redirect a domain name to a specific area on a site

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?cubecartexperts\.co.uk
Rewriterule ^(.*)$ http://www.i9000networks.com/landing-page/cubecart-experts/ [L]

You'll also need the domain set in your virtualhost config like this

ServerName www.i9000networks.com
ServerAlias www.cubecartexperts.co.uk
ServerAlias cubecartexperts.co.uk

It is a much more helpful way of helping your users navigate your site.

Tagged as: No Comments

Redirecting WordPress index.php to root

Posted on April 20, 2008

If you check the Page Rank of http://bloke.org against http://bloke.org/index.php, which are both, to a human, obviously the same page you'll see two different results. My domain carries a PR3 whilst the latter carries a PR0.

We know they are both the same, but do the crawlers? No, they don't.

Anonymous apache & PHP

Posted on August 9, 2007

Like to be conspicuous? Like me.

Then use the  ServerTokens and expose_php options. On a production web server I generally set these two options, pretty much stops and zero day hack attempts and other such nonsense

Page 2 of 212