Wildcard servername error


#1

Hi,

I would like to use the following servernames in my vhost configuration:

server_name test.domain1 test.domain2 test..domain1 test..domain2;

I’ve read in the doc
(http://wiki.codemongers.com/NginxVirtualHostExample)
that it’s possible to do this, however when I try to start nginx, it
dies
with the following:

Starting nginx: 2009/01/23 14:28:36 [emerg] 19004#0: invalid server name
or wildcard “test.*.domain1” on 0.0.0.0:81

This nginx-0.6.34 is installed from Ubuntu repository, if this counts.
Can
anyone shed some light please on this problem?

Regards,
-w-


#2

On Fri, Jan 23, 2009 at 02:31:20PM +0100, Zoltan HERPAI wrote:

Starting nginx: 2009/01/23 14:28:36 [emerg] 19004#0: invalid server name
or wildcard “test.*.domain1” on 0.0.0.0:81

This nginx-0.6.34 is installed from Ubuntu repository, if this counts. Can
anyone shed some light please on this problem?

Use regex:

server_name test.domain1 test.domain2
~^test…+.domain1$ ~^test…+.domain2$;