I was using a 4 year old installation of nginx (0.7) – apt-get update, apt-get install nginx claimed I had the latest version…
Turns out this error means the return directive isn’t supported in the `return 301 foo.com` format until a later nginx.
Install the latest nginx by following the docs at http://wiki.nginx.org/Install
sudo -s nginx=stable # use nginx=development for latest development version add-apt-repository ppa:nginx/$nginx apt-get update apt-get install nginx