I\'m using wildcard in server_name. I want to redirect all subdomains of example.com (configured as *.example.com) to foo.com except <
server_name
example.com
foo.com
The '*' wildcard character gets ignored by nginx:
nginx: [warn] conflicting server name "*.example.com" on 0.0.0.0.:80, ignored