How to stop spambots on trac

It’s very simple, indeed.

Edit your apache configuration (or, if you prefer, create an .htaccess file).

Add the following to the configuration of your virtual host.

<Location /cgi-bin/trac.cgi/newticket >
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "Please use User/pass to login"
AuthType Basic
<limit POST>
require valid-user
</limit>
</Location>

Of course, you should create an .htpasswd file, set the path correctly and modify the message to show the username and the password.

Hopefully, this will stop spambots.


3 Responses to “How to stop spambots on trac

  • 1
    silentman
    Settembre 6th, 2006 08:51

    ma non scrivi proprio piu` niente?

  • 2
    morpheus
    Ottobre 22nd, 2006 00:59

    I would rather use trac’s own rights management system (either through webadmin or trac-admin).
    It still requires HTTP auth (at least basic, Digest would be better if SSL is not an option), but at least you can further restrict your users without messing too much with apache configuration.
    (And by the way, I’d couple it with mod-svn-authz to enforce access restrictions on the repository - just make sure you’re using the same .htpasswd and authz acl file for both trac and mod-svn-authz)

  • 3
    CtRiX
    Marzo 27th, 2008 12:58

    @silentman:
    mi ero completamente dimenticato di avere un blog.
    Troppe cose da fare e nessuna voglia di aggiornarlo.

    Oggi ho trovato un pò di tempo per upgradare wordpress. Chissà se mi torna (anzi, mi viene perchè non c’è mai stata) la voglia di usarlo!

Leave a Reply

Miele per gli orsi, altro per le mosche.