A sample nginx config file that redirects traffic from a domain to b domain
# This config is for old-domain.com => new-domain.com redirecting
server {
listen 80;
listen 443 ssl;
server_name old-domain.com www.old-domain.com;
location / {
return 301 https://new-domain.com$request_uri;
}
#include /etc/nginx/conf.d/snippets/ssl.conf;
}