amazon ec2 – Why my nginx redirection doesnt work


I`m trying to do redirection via Nginx
webmail.mywebsite.to to gmail.com

I`m trying with

server {
  listen      80;
  server_name webmail.mywebsite.com;
  return      301 https://www.gmail.com;
}

But I stil get error

webmail.mywebsite.com server IP address could not be found.

I’m usin ec2 (where I install SSL ) and I’m using Route53 for my domain too ..