<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi there,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>We have developers working with various versions of web servers and programming languages, for different clients and environments.</DIV><DIV>I'm trying to do this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> server {</DIV><DIV> listen 80;</DIV><DIV> server_name apache1 *.apache1.*.mydomain.com;</DIV><DIV> location / {</DIV><DIV> proxy_pass <A href="http://127.0.0.1:4000">http://127.0.0.1:4000</A>;</DIV><DIV> }</DIV><DIV> }</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> server {</DIV><DIV> listen 80;</DIV><DIV> server_name apache2 *.apache2.*.mydomain.com;</DIV><DIV> location / {</DIV><DIV> proxy_pass <A href="http://127.0.0.1:5000">http://127.0.0.1:5000</A>;</DIV><DIV> }</DIV><DIV> }</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> server {</DIV><DIV> listen 80;</DIV><DIV> server_name litespeed *.litespeed.*.mydomain.com;</DIV><DIV> location / {</DIV><DIV> proxy_pass <A href="http://127.0.0.1:6000">http://127.0.0.1:6000</A>;</DIV><DIV> }</DIV><DIV> }</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>server {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>listen 80;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>server_name php5 *.php5.*.mydomain.com;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>location ~ \.php$ {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>fastcgi_pass 127.0.0.1:9000;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>fastcgi_index index.php;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>[...]</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With this configuration, the host dev1.mydomain.com could serve:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.apache1.dev1.mydomain.com">http://site1.apache1.dev1.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>apache1</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.apache2.dev1.mydomain.com">http://site1.apache2.dev1.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>apache2</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.litespeed.dev1.mydomain.com">http://site1.litespeed.dev1.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>litespeed</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.php5.dev1.mydomain.com">http://site1.php5.dev1.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>php5/fcgi, nginx</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>the host dev2.mydomain.com could serve:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.apache1.dev2.mydomain.com">http://site1.apache1.dev2.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>apache1</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.apache2.dev2.mydomain.com">http://site1.apache2.dev2.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>apache2</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.litespeed.dev2.mydomain.com">http://site1.litespeed.dev2.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>litespeed</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN><A href="http://site1.php5.dev2.mydomain.com">http://site1.php5.dev2.mydomain.com</A>/<SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>--><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>php5/fcgi, nginx</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>and they could have identical configuration. This is important because I want to keep the second wildcard (for "dev1/dev2"), so that I can make a machine image to install on new computers.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>But the wildcard doesn't work.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With nginx 0.6.0 I get this error:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre"> </SPAN>2007/06/27 11:36:07 [emerg] 27966#0: invalid server name or wildcard "*.apache1.*.mydomain.com" on 0.0.0.0:80</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With 0.5.26 the configuration test "nginx -t -c nginx.conf" is OK but it doesn't work - all requests are forwarded to apache 1, whatever host name is requested.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Does anybody know whether this is possible?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks very much for your help.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Best wishes,</DIV><DIV>Igor Clark.</DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>--</DIV><DIV>Igor Clark // POKE // 10 Redchurch Street // E2 7DD // +44 (0)20 7749 5355 // <A href="http://www.pokelondon.com">www.pokelondon.com</A></DIV></SPAN></SPAN></SPAN><DIV><BR class="khtml-block-placeholder"></DIV></SPAN><DIV>We've gone sub-zero with the TopGear Cool Wall: <A href="http://www.topgear.com/coolwall/">http://www.topgear.com/coolwall/</A></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>