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 in my httpd.conf.

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

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.

More in the discussion (powered by webmentions)

  • (no mentions, yet.)