How to exclude specific subdomains server_name in nginx configuration

前端 未结 2 551
天命终不由人
天命终不由人 2020-12-15 09:45

I\'m using wildcard in server_name. I want to redirect all subdomains of example.com (configured as *.example.com) to foo.com except <

2条回答
  •  被撕碎了的回忆
    2020-12-15 10:32

    The '*' wildcard character gets ignored by nginx:

    nginx: [warn] conflicting server name "*.example.com" on 0.0.0.0.:80, ignored

提交回复
热议问题