Hi All,<div><br></div><div>It appears that nginx is resolving invalid domains to existing ones, and I'm not entirely sure why. Any help would be much appreciated. :)</div><div><br></div><div>As an example, I have deployed an application and when I go to the link of the app, it works as expected (for example: <a href="http://swetatest1.unit-test.muleion.com/hellorest">http://swetatest1.unit-test.muleion.com/hellorest</a>). I also have valid test apps with the numbers 2, 3, and 4, and those links work as expected as well. However, when I go to <a href="http://swetatest5.unit-test.muleion.com/hellorest">http://swetatest5.unit-test.muleion.com/hellorest</a> , it still resolves instead of throwing an error. Even a completely random pattern, such as <a href="http://abc.unit-test.muleion.com/hellorest">http://abc.unit-test.muleion.com/hellorest</a> resolves to an existing one and it shouldn't (there's not even a config file for <a href="http://abc.unit-test.muleion.com">abc.unit-test.muleion.com</a> or all of the other invalid domains) -- the server_name field below should be looking for an exact match for the name (according to the nginx docs), so why are other ones resolving?</div>
<div><br></div><div>Here is the relevant part of the nginx config for one of the apps (X'd out both the IP and ports but those are valid):</div><div><div>server { </div><div> listen 80;</div><div> server_name <a href="http://swetatest1.unit-test.muleion.com">swetatest1.unit-test.muleion.com</a>;</div>
<div> location / {</div><div> proxy_pass <a href="http://swetatest1.unit-test.muleion.com_http">http://swetatest1.unit-test.muleion.com_http</a>;</div><div> include /etc/nginx/proxy.conf;</div>
<div> }</div><div>}</div><div>server { </div><div> listen 443;</div><div> server_name <a href="http://swetatest1.unit-test.muleion.com">swetatest1.unit-test.muleion.com</a>;</div><div>
ssl on;</div><div> ssl_certificate /etc/nginx/server.crt;</div><div> ssl_certificate_key /etc/nginx/server.key;</div><div> location / {</div><div> proxy_pass <a href="https://swetatest1.unit-test.muleion.com_https">https://swetatest1.unit-test.muleion.com_https</a>;</div>
<div> include /etc/nginx/proxy.conf;</div><div> }</div><div>}</div><div>upstream swetatest1.unit-test.muleion.com_http {</div><div>server XX.XXX.XX.XX:PORT;</div><div>}</div><div>upstream swetatest1.unit-test.muleion.com_https {</div>
<div>server XX.XXX.XX.XX:PORT;</div><div>}</div></div><div><br></div><div>Has anybody else seen this issue before, and if so, how did you fix it? Any suggestions or feedback would be greatly appreciated.</div><div><br></div>
<div>Thanks!</div><div>-Sweta</div><div>-- </div><div>Sweta Vajjhala<div>Software Engineer</div><div>MuleSoft Inc.</div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">30 Maiden Lane Suite #500<br>
San Francisco, CA 94108</span></div>
</div>