Ridiculously simple NTLM Authentication for Apache (Ubuntu)
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.
mod_geoip Revisted including stopping spam in phpBB 2
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
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
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
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
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.
.htaccess redirect based on requested domain
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.
Redirecting WordPress index.php to root
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
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