Forum: NGINX Wildcard servername error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2fefdeac1e8f28020dad954e18e74033?d=identicon&s=25 Zoltan HERPAI (Guest)
on 2009-01-23 14:38
(Received via mailing list)
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-
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-01-23 14:48
(Received via mailing list)
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$;
This topic is locked and can not be replied to.