Regular expression used in server_name directive

justin nginx-forum at
Sun Mar 3 19:21:10 UTC 2013

I actually have a working regular expression which should work now:

   server_name ^(?!web3\.)(?<account>.+)\.mydomain\.com$;

But for some odd reason when I restart nginx, I am getting:

  nginx: [emerg] unknown "account" variable

This should work though, right?

Posted at Nginx Forum:,236870,236876#msg-236876

More information about the nginx mailing list