To log some useful Nginx Server Configurations.

Rewrite

Between Webstites

server {
    listen 80;
    server_name old.com www.old.com;
    return 301 $scheme://www.new.com$request_uri;
}

301 = permanent; 302 = temporary
$scheme is used to define the protocol (HTTP or HTTPS)
$request_uri enable redirct for the full url path.
e.g.: www.old.com/path/ -> www.new.com/path/