ArchivePage 2 of 13

Force SSL on a directory with Apache

Inside a .htaccess file residing in the directory you want to force SSL on add this:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Mint modifications

Out of the box, Linux Mint 7 is pretty attractive visually. There were however a few things I wanted to tweak but due to some underlying changes made from stock Ubuntu I had to do some sniffing around to find them.

Continue reading ‘Mint modifications’

GPG key apt error Ubuntu / Mint

If you’ve added a 3rd party repository and are receiving an error on apt-get update then this is what you need to do:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com \ GPGCODEHERE

GPGCODEHERE = The code it is complaining about. For example:

gpg --no-default-keyring --primary-keyring /etc/apt/trusted.gpg --recv 359AAB34

Yup, you guessed it!

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com \ 359AAB34

Then you should be able to apt-get update && apt-get install whatever it was you just added. ;)

Wordpress Spam

While recently tasked with moderating a rather large spam collection from a friends blog (>~127K) it dawned on me that manually doing so would be a weeks worth of clicking.

Thankfully there were only a few legit comments right at the back and so after approving them it was a simple MySQL query that saved the day.

delete from wp_comments where comment_approved=0;

Bye bye spam!

I now have akismet running on the site and strict moderation rules so this shouldn’t happen again.

Enable those plugins people! ;)