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