Welcome! Log In Create A New Profile

Advanced

Re: using foo.*.example.com as wilcards

Chris Kelly
November 04, 2009 05:40PM
On Nov 4, 2009, at 5:04 PM, Maxim Dounin wrote:
> On Wed, Nov 04, 2009 at 04:00:03PM -0500, Chris Kelly wrote:
>
>> hello. I'm using nginx 0.6.39 and trying to get wildcards like
>> foo.*.example.com working which according to
>> http://wiki.nginx.org/NginxVirtualHostExample should work, but I get
>> "invalid serer name or wildcard" when attempting to start nginx.
>> nothing in the changelog indicates that a newer version of nginx
>> would fix this.
>
> It shouldn't work, this wiki example is wrong. Feel free to fix
> it.

Wiki example fixed.

> Wildcards only allowed at start or at end of server name. For
> arbitrary matching use regular expressions, see here for details:
>
> http://wiki.nginx.org/NginxHttpCoreModule#server_name

>> Any suggestions on a way to make this work? It's a rather odd
>> situation, but *.example.com and foo.*.example.com live on separate
>> clusters of web servers.
>
> server_name ~^foo\..*\.example\.com;

This works perfectly. Thanks!
Subject Author Posted

using foo.*.example.com as wilcards

Chris Kelly November 04, 2009 04:08PM

Re: using foo.*.example.com as wilcards

Maxim Dounin November 04, 2009 05:10PM

Re: using foo.*.example.com as wilcards

Chris Kelly November 04, 2009 05:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 165
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready