Matt Connolly's Blog

my brain dumps here…

Tag Archives: web design

Ruby on Rails Virtual Host craziness

I followed the instructions for installing ruby with passenger from this blog: http://benr75.com/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard

I had a similar problem to Tom’s comment where all my web requests ended up being handled by passenger (mod_rails). RTFM’ing about virtual hosts found a solution for me:

http://httpd.apache.org/docs/2.2/vhosts/name-based.html

The first virtual host becomes the main site. So you need a virtual host for “localhost” with ServerName localhost and DocumentRoot matching the main server DocumentRoot.

Otherwise the rails app will become the default, and the entire site will be handled by passenger. Most frustating.

Advertisements

spam spam and more spam

Helping out with building a website for a friend at the moment, and you guessed it, the guestbook got filled with spam.

Fortunately it was easily removed because it was all from one email address, so that made it easy to remove all the posts in one big hit.

But it got me thinking about how to stop it.

Here’s a few things I’m going to try:

  1. Only accept posts where I can verify that the referrer is my own site.
  2. Automatically block posts where more than a certain number of posts happen in a day from the same IP address  (let’s say 5 per day).
  3. Use the API from this site: http://www.stopforumspam.com/
  4. Perhaps use Captcha from here: http://www.captcha.net/

I was pretty impressed with the Stop Forum Spam site – the guy spamming mine was on that list already. I guess the more sites use anti-spam databases, the harder it is for spammers to get their stuff out there.

Any other ideas are welcome!