<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><blockquote type="cite"><div>server {<br> listen 80;<br> listen IP:80;<br> server_name <a href="http://example.com">example.com</a>;<br> # site A<br>}<br><br>server {<br> listen 80 default_server;<br> # site B<br>}<br><br>"listen 80/server_name <a href="http://example.com">example.com</a>" route all requests to <a href="http://example.com">example.com</a> to site A.<br>"listen IP:80" routes all requests to IP:80 to site A.<br>Anything else is routed to default server of 80 port, i.e. to site B. <br></div></blockquote></div><br><div>Thank you Igor.</div><div><br></div><div>Unfortunately, that's not what I needed. I don't necessarily know the IP address(es) on these machines. This is part of an automated deployment.</div><div><br></div><div>Server A:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Specific Domain Name</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>any IPs</div><div><br></div><div>Server B</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>any domain names</div><div><br></div><div><br></div><div>Francis-</div><div><br></div><div>Thank you for this bit -- </div><div><br></div><div><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span> server {<br><span class="Apple-tab-span" style="white-space:pre"> </span> server_name <a href="http://example.com/">example.com</a>;<br><span class="Apple-tab-span" style="white-space:pre"> </span> server_name ~^[0-9.]*$;<br><span class="Apple-tab-span" style="white-space:pre"> </span> return 200 "site A\n";<br><span class="Apple-tab-span" style="white-space:pre"> </span> }<br></blockquote></div><div><br></div><div>i didn't think of a regex-based server name. that works perfectly.</div><br></body></html>