Using Apache mod_security and .htaccess to block comment spam on the web

Comment spam is the most annoying thing to web operators. Besides eating up bandwidth, comment spam can pollute web discussions area and which gives bad impression to visitors.

Apache HTTPD mod_security module can be configured to reduce web spam by filtering common keyword, content and referrer used by spam bots around the internet.

Here’s an example of .htaccess file to block common comment spam :

<IfModule mod_security.c>
SecFilterEngine On
SecFilterScanPOST On
SecFilterDefaultAction "deny,nolog,auditlog,status:503"
SecFilterSelective POST_PAYLOAD "(mortgage|viagra|poker|traffic|discount|medical|casino|lyrics|loan)"

</IfModule>

Please ensure that your Apache installation has mod_security module enabled. The method is suitable to be used on websites that receive a lot of user comments like forums, blogs (including WordPress and Drupal) and photo gallery.

Note: This is not a full-proof solution as it depends on the use of keywords.

Does Twitter kills my blog?

This is probably the first thing that I thought of when I first started of this blog two five years ago… that is the probability that I might find other hobby or work that much more appealing than paying attention to this blog.

The first culprit would be twitter, because ever since I started to hook up with it, I’ve beginning to post updates less frequently than I usually do, until it reaches a point that I stopped posting updates altogether, even though there are loads event that are worthy for me to blog with.

Maybe I’ve lost my passion of updating blogs with my daily hacking activities, or may I simply haven’t got the hang around of updating my blog while juggling with my new work, updating tweets and working on my research projects. Whatever the reason is, it is my intention to keep my post coming out fresh despite having to adjust to my new environment, and for that to happen I need to discipline myself to post regular updates on my blog.

Twitter is nice to use, as it requires less effort to post updates about my activities and make it easy for me to keep updated with my friends, but it greatest advantage seems to have taken a toll on my blog and I’ve nothing to blame but myself :p

Enabled WP-SuperCache for my blog

I’ve decided to install and enable WP-SuperCache plugin for my blog. This does not mean that I’ve been receiving thousands of site hit everyday, but as a precaution because I’ve noticed spikes of traffic on the server log that might effect the overall performance of the web server.

Since most pro-blogger suggested WP-Supercache, I might as well take their advice and install it. Hopefully this would improve the server load during the spike (which I suspect contributed by ill-behave webbots/crawler) as well as loading time for my blog.

I’ll keep my fingers crossed

Secure your WordPress installation now, avoid from being compromised

Following recent announcement from Technorati about WordPress security vulnerability issue and the fact that there are a lot of WordPress sites that has been compromised. It is recommended those who are running WordPress blog to upgrade and tightens their WordPress site security to prevent it from being injected with malicious or spammy code.

Here are few pointers that might help you secure your WordPress installation to prevent it from being cracked into :

Remember you will be responsible for all the damage caused by the crackers should your site been cracked into

I’ve Upgraded Upgraded to WordPress 2.5!

Finally after spending some precious time procrastinating, I finally upgraded my blog to WordPress 2.5. New features that I immediately found helpful are :

wordpress logo

  • Multiple file upload
  • Clean interface design
  • Administrative panel loads faster
  • Easier for me to load up media files (video, audio, photos)

This could mean that I’ll be posting more regularly. Btw, sorry for the hiatus, I’ll be updating this blog more regularly after this.