Welcome! Log In Create A New Profile

Advanced

Re: Invalid domains are resolving to existing ones

Maxim Dounin
July 13, 2011 06:08PM
Hello!

On Wed, Jul 13, 2011 at 11:55:20AM -0700, Sweta Vajjhala wrote:

> Hi All,
>
> It appears that nginx is resolving invalid domains to existing ones, and I'm
> not entirely sure why. Any help would be much appreciated. :)
>
> As an example, I have deployed an application and when I go to the link of
> the app, it works as expected (for example:
> http://swetatest1.unit-test.muleion.com/hellorest). 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 http://swetatest5.unit-test.muleion.com/hellorest , it
> still resolves instead of throwing an error. Even a completely random
> pattern, such as http://abc.unit-test.muleion.com/hellorest resolves to an
> existing one and it shouldn't (there's not even a config file for
> abc.unit-test.muleion.com 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?

If there is no server_name match found, nginx will use default
server (either first one defined, or explicitly marked with
"listen ... default_server") for a listen socket in question to
process a request.

Please refer here for details:

http://nginx.org/en/docs/http/request_processing.html

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Invalid domains are resolving to existing ones

Sweta Vajjhala July 13, 2011 02:56PM

Re: Invalid domains are resolving to existing ones

Maxim Dounin July 13, 2011 06:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
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