Regular expression used in server_name directive

justin nginx-forum at nginx.us
Sun Mar 3 17:43:57 UTC 2013


I am using a regular expression with a capture group in my server_name
directive. It looks like:

    server_name (?<account>.+)\.mydomain\.com$

The problem is that I want to expand it slightly and say anything except
web3.mydomain.com. I.E.

   something.mydomain.com matches, but web3.mydomain.com does not match.

How is this possible?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236870,236870#msg-236870



More information about the nginx mailing list