<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hi<br>
<br>
At the moment we're using lighttpd, but its proving to be a little
flaky with php-fcgi. I'd like to know whether its possible to get the
following set-up working so I can replace lighttpd with nginx.<br>
<br>
We use a *lot* of wildcard domains. The subdomains correspond to a
client, and they have their own areas:<br>
<br>
review.*.ourdomain.com<br>
mail</font></font><font size="-1"><font
 face="Helvetica, Arial, sans-serif">.*.ourdomain.com<br>
dev</font></font><font size="-1"><font
 face="Helvetica, Arial, sans-serif">.*.ourdomain.com<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">*.ourdomain.com<br>
<br>
This is pretty trivial to set up in lighttpd:<br>
<br>
$HTTP["host"] =~ "^review\.(.*)\.ourdomain\.com" {}<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">$HTTP["host"]
=~ "^mail\.(.*)\.ourdomain\.com" {}<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">$HTTP["host"]
=~ "^dev\.(.*)\.ourdomain\.com" {}<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">$HTTP["host"]
=~ "^(.*)\.ourdomain\.com" {}<br>
<br>
Trying to set up something similar in nginx raises problems. This is my
setup:<br>
<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">server
{<br>
server_name review.it.ourdomain.com review.*.ourdomain.com;<br>
...<br>
}<br>
<br>
</font></font><font size="-1"><font face="Helvetica, Arial, sans-serif">server
{<br>
server_name </font></font><font size="-1"><font
 face="Helvetica, Arial, sans-serif">dev</font></font><font size="-1"><font
 face="Helvetica, Arial, sans-serif">.it.ourdomain.com </font></font><font
 size="-1"><font face="Helvetica, Arial, sans-serif">dev</font></font><font
 size="-1"><font face="Helvetica, Arial, sans-serif">.*.ourdomain.com;<br>
...<br>
}<br>
<br>
but this just throws the following error:<br>
<br>
[emerg] 3320#0: invalid server name or wildcard "dev.*.ourdomain.com"<br>
<br>
Any idea how I can achieve the result I'm looking for?</font></font><font
 size="-1"><font face="Helvetica, Arial, sans-serif"><br>
</font></font>
<div class="moz-signature">-- <br>
<div
 style="font-family: sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 1.1; font-size-adjust: none; font-stretch: normal; width: 300px; color: rgb(51, 51, 51);">
<p><strong>Phillip B Oldham</strong><br>
The Activity People<br>
<a href="mailto:phill@theactivitypeople.co.uk">phill@theactivitypeople.co.uk</a></p>
<hr size="1">
<p style="font-size: 90%;"><strong>Policies</strong></p>
<p style="font-size: 90%;">This e-mail and its attachments are intended
for the above named recipient(s) only and may be confidential. If they
have come to you in error, please reply to this e-mail and highlight
the error. No action should be taken regarding content, nor must you
copy or show them to anyone.</p>
<p style="font-size: 90%;">This e-mail has been created in the
knowledge that Internet e-mail is not a 100% secure communications
medium, and we have taken steps to ensure that this e-mail and
attachments are free from any virus. We must advise that in keeping
with good computing practice the recipient should ensure they are
completely virus free, and that you understand and observe the lack of
security when e-mailing us.</p>
<hr size="1">
</div>
</div>
</body>
</html>