changes redirects to only include server_name

I had to remove the listen part, as it created a redirect loop.

I'm pushing this upstream, but I'm not too sure if this is useful for anyone else?