Redirecting website visitors to a different domain name using Nginx is simple.

Add the following code to your server config: 

server { server_name .domain.com;
return 302 $scheme://forwarded-domain.com;
}

Restart Nginx

sudo /etc/init.d/nginx restart