Server_Name regular expression

christospap nginx-forum at
Thu Aug 29 09:01:01 UTC 2013

I would like to syntax a regular expression which will match two server
names. The server names are and In particular,
a regular expression for www or nothing

I wrote the following regular expression (www\.|) Nginx
configuration file is compatible with Perl programming language. While it
should work, it doesn't seem to work. I cannot find the proper regular
expression. Does anyone have an idea how to synatx the regular expression?


Posted at Nginx Forum:,242321,242321#msg-242321

More information about the nginx mailing list