fixes #3 and an undefined HTTP_HOST error

The error output in capistrano suggested I try this, and it seems to work.