Stopping spam on my private wiki

Some fucker spammed my private wiki with loads of links. I suspect it was some kind of spamming robot. Anyway, that’s gotta stop. Fortunately, since it’s a private wiki, I don’t need to leave access open to people. That being the case, what I want to do is enforce authentication on URLs with @edit in them. This is done using the Apache LocationMatch directive: I added the following into the VirtualHost section that defines kryogenix.org in my httpd.conf.

<LocationMatch "wiki/@edit">
 AuthType Basic
AuthName "No spam"
AuthUserFile /var/www/kryogenix.org/html/wiki/.htpasswd
Require valid-user
</LocationMatch>

The really annoying thing is that you can’t use LocationMatch in a .htaccess file. Why? Why does this require me to have root access to edit the main server configuration file? It’s really bloody irritating.

4 Responses to “Stopping spam on my private wiki”

  1. which is why my wiki has authentication on. I might now switch to pwyky and use this very neat method, thanks.

    p.s. the link my private wiki is very very hard to click on because div class=nav sits over the top of div id=content. (isn’t the web developer toolbar useful).

    Sarabian
  2. re the PS: I know. Has been a fault of this design since the day I did it, that. It’s why a new design is on the cards (well, that and many other reasons…)

    sil
  3. You could always try turning the pedit configuration option to ‘False’ and then using the javascript bookmarklet from the web site to do your editing. I’m going to try that on my wiki in the next couple of days.

    Andy Todd
  4. Ah, I assumed that the spam robot was written specifically for pwyky sites. If that’s the case, then having the link hidden won’t help, because it’s still available and therefore a robot can still use it.

    sil

Leave a Reply

OpenID is a decentralised authentication system. If you use LiveJournal or Vox you already have an OpenID; just use the URL of your homepage there. See also how to get yourself an OpenID.